1 | {↵ | | 1 | {↵
|
2 | // -incremental↵ | | 2 | // -↵
|
| | | 3 | keep↵
|
3 | cmd.createArgument().setValue(FLAG_INCREMENTAL);↵ | | 4 | cmd.createArgument().setValue(FLAG_KEEPCOPY);↵
|
4 | }↵ | | 5 | }↵
|
|
5 | if (getNlabel()) {↵ | | 6 | if (getIdentical()) {↵
|
6 | // -nlabel↵ | | 7 | // -identical↵
|
7 | cmd.createArgument().setValue(FLAG_NLABEL);↵ | | 8 | cmd.createArgument().setValue(FLAG_IDENTICAL);↵
|
8 | }↵ | | 9 | }↵
|
|
9 | // baseline_root_name↵ | | 10 | // viewpath↵
|
10 | cmd.createArgument().setValue(getBaselineRootName());↵ | | 11 | cmd.createArgument().setValue(getViewPath());↵
|
|
11 | }↵ | | 12 | }↵
|
|
|
12 | /**↵ | | 13 | /**↵
|
13 | * Set comment string↵ | | 14 | * Sets the comment string.↵
|
14 | *↵ | | 15 | *↵
|
15 | * @param comment the comment string↵ | | 16 | * @param comment the comment string↵
|
16 | */↵ | | 17 | */↵
|
17 | public void setComment(String comment) {↵ | | 18 | public void setComment(String comment) {↵
|
18 | mComment = comment;↵ | | 19 | mComment = comment;↵
|
19 | }↵ | | 20 | }↵
|
|
20 | /**↵ | | 21 | /**↵
|
21 | * Get comment string↵ | | 22 | * Get comment string↵
|
22 | *↵ | | 23 | *↵
|
23 | * @return String containing the comment↵ | | 24 | * @return String containing the comment↵
|
24 | */↵ | | 25 | */↵
|
25 | public String getComment() {↵ | | 26 | public String getComment() {↵
|
26 | return mComment;↵ | | 27 | return mComment;↵
|
27 | }↵ | | 28 | }↵
|
|
28 | /**↵ | | 29 | /**↵
|
29 | * Set comment file↵ | | 30 | * Specifies a file containing a comment.↵
|
30 | *↵ | | 31 | *↵
|
31 | * @param cfile the path to the comment file↵ | | 32 | * @param cfile the path to the comment file↵
|
32 | */↵ | | 33 | */↵
|
33 | public void setCommentFile(String cfile) {↵ | | 34 | public void setCommentFile(String cfile) {↵
|
34 | mCfile = cfile;↵ | | 35 | mCfile = cfile;↵
|
35 | }↵ | | 36 | }↵
|
|
36 | /**↵ | | 37 | /**↵
|
37 | * Get comment file↵ | | 38 | * Get comment file↵
|
38 | *↵ | | 39 | *↵
|
39 | * @return String containing the path to the comment file↵ | | 40 | * @return String containing the path to the comment file↵
|
40 | */↵ | | 41 | */↵
|
41 | public String getCommentFile() {↵ | | 42 | public String getCommentFile() {↵
|
42 | return mCfile;↵ | | 43 | return mCfile;↵
|
43 | }↵ | | 44 | }↵
|
|
44 | /**↵ | | 45 | /**↵
|
45 | * Set baseline_root_name↵ | | 46 | * ↵
|
46 | *↵ | | |
|
47 | * @param baselineRootName the name of the baseline↵ | | |
|
48 | */↵ | | |
|
49 | public void setBaselineRootName(String baselineRootName) {↵ | | |
|
50 | mBaselineRootName = baselineRootName;↵ | | |
|
51 | }↵ | | |
|
|
52 | /**↵ | | |
|
53 | * Get baseline_root_name↵ | | |
|
54 | *↵ | | |
|
55 | * @return String containing the name of the baseline↵ | | |
|
56 | */↵ | | |
|
57 | public String getBaselineRootName() {↵ | | |
|
58 | return mBaselineRootName;↵ | | |
|
59 | }↵ | | |
|
|
60 | /**↵ | | |
|
|
61 | /**↵ | | |
|
62 | * Set the nowarn flag↵ | | 47 | If true, suppress warning messages.↵
|
63 | *↵ | | 48 | *↵
|
64 | * @param nwarn the status to set the flag to↵ | | 49 | * @param nwarn the status to set the flag to↵
|
65 | */↵ | | 50 | */↵
|
66 | public void setNoWarn(boolean nwarn) {↵ | | 51 | public void setNoWarn(boolean nwarn) {↵
|
67 | mNwarn = nwarn;↵ | | 52 | mNwarn = nwarn;↵
|
68 | }↵ | | 53 | }↵
|
|
69 | /**↵ | | 54 | /**↵
|
70 | * Get nowarn flag status↵ | | 55 | * Get nowarn flag status↵
|
71 | *↵ | | 56 | *↵
|
72 | * @return boolean containing status of nwarn flag↵ | | 57 | * @return boolean containing status of nwarn flag↵
|
73 | */↵ | | 58 | */↵
|
74 | public boolean getNoWarn() {↵ | | 59 | public boolean getNoWarn() {↵
|
75 | return mNwarn;↵ | | 60 | return mNwarn;↵
|
76 | }↵ | | 61 | }↵
|
|
77 | /**↵ | | 62 | /**↵
|
78 | * Set the identical flag↵ | | 63 | * If true, preserve the modification time.↵
|
79 | *↵ | | 64 | *↵
|
80 | * @param identical the status to set the flag to↵ | | 65 | * @param ptime the status to set the flag to↵
|
81 | */↵ | | 66 | */↵
|
82 | public void setIdentical(boolean identical) {↵ | | 67 | public void set↵
|
83 | mIdentical = identical↵ | | 68 | PreserveTime(boolean ptime) {↵
|
84 | ;↵ | | 69 | mPtime = ptime;↵
|
85 | }↵ | | 70 | }↵
|
|
86 | /**↵ | | 71 | /**↵
|
87 | * Get identical flag status↵ | | 72 | * Get preservetime flag status↵
|
88 | *↵ | | 73 | *↵
|
89 | * @return boolean containing status of identical flag↵ | | 74 | * @return boolean containing status of preservetime flag↵
|
90 | */↵ | | 75 | */↵
|
91 | public boolean getIdentical() {↵ | | 76 | public boolean getPreserveTime() {↵
|
92 | return mIdentical;↵ | | 77 | return mPtime;↵
|
93 | }↵ | | 78 | }↵
|
|
94 | /**↵ | | 79 | /**↵
|
95 | * Set the full flag↵ | | 80 | * If true, keeps a copy of the file with a .keep extension.↵
|
96 | *↵ | | 81 | *↵
|
97 | * @param full the status to set the flag to↵ | | 82 | * @param keep the status to set the flag to↵
|
98 | */↵ | | 83 | */↵
|
99 | public void setFull(boolean full) {↵ | | 84 | public void setKeepCopy(boolean keep) {↵
|
100 | mFull = full;↵ | | 85 | mKeep = keep;↵
|
101 | }↵ | | 86 | }↵
|
|
102 | /**↵ | | 87 | /**↵
|
103 | * Get full flag status↵ | | 88 | * Get keepcopy flag status↵
|
104 | *↵ | | 89 | *↵
|
105 | * @return boolean containing status of full flag↵ | | 90 | * @return boolean containing status of keepcopy flag↵
|
106 | */↵ | | 91 | */↵
|
107 | public boolean getFull() {↵ | | 92 | public boolean getKeepCopy() {↵
|
108 | return mFull;↵ | | 93 | return mKeep;↵
|
109 | }↵ | | 94 | }↵
|
|
110 | /**↵ | | 95 | /**↵
|
111 | * Set the nlabel flag↵ | | 96 | * If true, allows the file to be checked in even↵
|
| | | 97 | * if it is identical to the original.↵
|
112 | *↵ | | 98 | *↵
|
113 | * @param nlabel the status to set the flag to↵ | | 99 | * @param identical the status to set the flag to↵
|
114 | */↵ | | 100 | */↵
|
115 | public void setNlabel(boolean nlabel) {↵ | | 101 | public void setIdentical(boolean identical) {↵
|
116 | mNlabel = nlabel;↵ | | 102 | mIdentical = identical;↵
|
117 | }↵ | | 103 | }↵
|
|
118 | /**↵ | | 104 | /**↵
|
119 | * Get nlabel status↵ | | 105 | * Get identical flag status↵
|
120 | *↵ | | 106 | *↵
|
121 | * @return boolean containing status of nlabel flag↵ | | 107 | * @return boolean containing status of identical flag↵
|
122 | */↵ | | 108 | */↵
|
123 | public boolean getNlabel() {↵ | | 109 | public boolean getIdentical() {↵
|
124 | return mNlabel;↵ | | 110 | return mIdentical;↵
|
125 | }↵ | | 111 | }↵
|
|
|
126 | /**↵ | | 112 | /**↵
|
127 | * Get the 'comment' command↵ | | 113 | * Get the 'comment' command↵
|
128 | *↵ | | 114 | *↵
|
129 | * @param cmd containing the command line string with or↵ | | 115 | * @param cmd containing the command line string with or↵
|
130 | * without the comment flag and string appended↵ | | 116 | * without the comment flag and string appended↵
|
131 | */↵ | | 117 | */↵
|
132 | private void getCommentCommand(Commandline cmd) {↵ | | 118 | private void getCommentCommand(Commandline cmd) {↵
|
133 | if (getComment() != null) {↵ | | 119 | if (getComment() != null) {↵
|
134 | /* Had to make two separate commands here because if a space is↵ | | 120 | /* Had to make two separate commands here because if a space is↵
|
135 | inserted between the flag and the value, it is treated as a↵ | | 121 | inserted between the flag and the value, it is treated as a↵
|
136 | Windows filename with a space and it is enclosed in double↵ | | 122 | Windows filename with a space and it is enclosed in double↵
|
137 | quotes ("). This breaks clearcase.↵ | | 123 | quotes ("). This breaks clearcase.↵
|
138 | */↵ | | 124 | */↵
|
139 | cmd.createArgument().setValue(FLAG_COMMENT);↵ | | 125 | cmd.createArgument().setValue(FLAG_COMMENT);↵
|
140 | cmd.createArgument().setValue(getComment());↵ | | 126 | cmd.createArgument().setValue(getComment());↵
|
141 | }↵ | | 127 | }↵
|
142 | }↵ | | 128 | }↵
|
|
143 | /**↵ | | 129 | /**↵
|
144 | * Get the 'commentfile' command↵ | | 130 | * Get the 'commentfile' command↵
|
145 | *↵ | | 131 | *↵
|
146 | * @param cmd CommandLine containing the command line string with or↵ | | 132 | * @param cmd containing the command line string with or↵
|
147 | * without the commentfile flag and file appended↵ | | 133 | * without the commentfile flag and file appended↵
|
148 | */↵ | | 134 | */↵
|
149 | private void getCommentFileCommand(Commandline cmd) {↵ | | 135 | private void getCommentFileCommand(Commandline cmd) {↵
|
150 | if (getCommentFile() != null) {↵ | | 136 | if (getCommentFile() != null) {↵
|
151 | /* Had to make two separate commands here because if a space is↵ | | 137 | /* Had to make two separate commands here because if a space is↵
|
152 | inserted between the flag and the value, it is treated as a↵ | | 138 | inserted between the flag and the value, it is treated as a↵
|
153 | Windows filename with a space and it is enclosed in double↵ | | 139 | Windows filename with a space and it is enclosed in double↵
|
154 | quotes ("). This breaks clearcase.↵ | | 140 | quotes ("). This breaks clearcase.↵
|
155 | */↵ | | 141 | */↵
|
156 | cmd.createArgument().setValue(FLAG_COMMENTFILE);↵ | | 142 | cmd.createArgument().setValue(FLAG_COMMENTFILE);↵
|
157 | cmd.createArgument().setValue(getCommentFile());↵ | | 143 | cmd.createArgument().setValue(getCommentFile());↵
|
158 | }↵ | | 144 | }↵
|
159 | | | 145 |
|