Show More
@@ -1,231 +1,234 | |||||
1 | Test config convert.cvsps.mergefrom config setting. |
|
1 | Test config convert.cvsps.mergefrom config setting. | |
2 | (Should test similar mergeto feature, but I don't understand it yet.) |
|
2 | (Should test similar mergeto feature, but I don't understand it yet.) | |
3 | Requires builtin cvsps. |
|
3 | Requires builtin cvsps. | |
4 |
|
4 | |||
5 | $ "$TESTDIR/hghave" cvs || exit 80 |
|
5 | $ "$TESTDIR/hghave" cvs || exit 80 | |
6 | $ CVSROOT=`pwd`/cvsrepo |
|
6 | $ CVSROOT=`pwd`/cvsrepo | |
7 | $ export CVSROOT |
|
7 | $ export CVSROOT | |
8 |
|
8 | |||
9 | $ cvscall() |
|
9 | $ cvscall() | |
10 | > { |
|
10 | > { | |
11 | > cvs -f "$@" |
|
11 | > cvs -f "$@" | |
12 | > } |
|
12 | > } | |
13 |
|
13 | |||
14 | output of 'cvs ci' varies unpredictably, so just discard it |
|
14 | output of 'cvs ci' varies unpredictably, so just discard it | |
15 | XXX copied from test-convert-cvs-synthetic |
|
15 | XXX copied from test-convert-cvs-synthetic | |
16 |
|
16 | |||
17 | $ cvsci() |
|
17 | $ cvsci() | |
18 | > { |
|
18 | > { | |
19 | > cvs -f ci "$@" > /dev/null |
|
19 | > cvs -f ci "$@" > /dev/null | |
20 | > } |
|
20 | > } | |
21 |
|
21 | |||
22 | XXX copied from test-convert-cvs-synthetic |
|
22 | XXX copied from test-convert-cvs-synthetic | |
23 |
|
23 | |||
24 | $ echo "[extensions]" >> $HGRCPATH |
|
24 | $ echo "[extensions]" >> $HGRCPATH | |
25 | $ echo "convert = " >> $HGRCPATH |
|
25 | $ echo "convert = " >> $HGRCPATH | |
26 | $ echo "graphlog = " >> $HGRCPATH |
|
26 | $ echo "graphlog = " >> $HGRCPATH | |
27 | $ echo "[convert]" >> $HGRCPATH |
|
27 | $ echo "[convert]" >> $HGRCPATH | |
28 | $ echo "cvsps.cache=0" >> $HGRCPATH |
|
28 | $ echo "cvsps.cache=0" >> $HGRCPATH | |
29 | $ echo "cvsps.mergefrom=\[MERGE from (\S+)\]" >> $HGRCPATH |
|
29 | $ echo "cvsps.mergefrom=\[MERGE from (\S+)\]" >> $HGRCPATH | |
30 |
|
30 | |||
31 | create cvs repository with one project |
|
31 | create cvs repository with one project | |
32 |
|
32 | |||
33 | $ mkdir cvsrepo |
|
33 | $ mkdir cvsrepo | |
34 | $ cvscall -q -d "$CVSROOT" init |
|
34 | $ cvscall -q -d "$CVSROOT" init | |
35 | $ mkdir cvsrepo/proj |
|
35 | $ mkdir cvsrepo/proj | |
36 |
|
36 | |||
37 | populate cvs repository |
|
37 | populate cvs repository | |
38 |
|
38 | |||
39 | $ cvscall -Q co proj |
|
39 | $ cvscall -Q co proj | |
40 | $ cd proj |
|
40 | $ cd proj | |
41 | $ touch file1 |
|
41 | $ touch file1 | |
42 | $ cvscall -Q add file1 |
|
42 | $ cvscall -Q add file1 | |
43 | $ cvsci -m"add file1 on trunk" |
|
43 | $ cvsci -m"add file1 on trunk" | |
44 | cvs commit: Examining . |
|
44 | cvs commit: Examining . | |
45 |
|
45 | |||
46 | create two release branches |
|
46 | create two release branches | |
47 |
|
47 | |||
48 | $ cvscall -q tag -b v1_0 |
|
48 | $ cvscall -q tag -b v1_0 | |
49 | T file1 |
|
49 | T file1 | |
50 | $ cvscall -q tag -b v1_1 |
|
50 | $ cvscall -q tag -b v1_1 | |
51 | T file1 |
|
51 | T file1 | |
52 |
|
52 | |||
53 | modify file1 on branch v1_0 |
|
53 | modify file1 on branch v1_0 | |
54 |
|
54 | |||
55 | $ cvscall -Q update -rv1_0 |
|
55 | $ cvscall -Q update -rv1_0 | |
|
56 | $ sleep 1 | |||
56 | $ echo "change" >> file1 |
|
57 | $ echo "change" >> file1 | |
57 | $ cvsci -m"add text" |
|
58 | $ cvsci -m"add text" | |
58 | cvs commit: Examining . |
|
59 | cvs commit: Examining . | |
59 |
|
60 | |||
60 | make unrelated change on v1_1 |
|
61 | make unrelated change on v1_1 | |
61 |
|
62 | |||
62 | $ cvscall -Q update -rv1_1 |
|
63 | $ cvscall -Q update -rv1_1 | |
63 | $ touch unrelated |
|
64 | $ touch unrelated | |
64 | $ cvscall -Q add unrelated |
|
65 | $ cvscall -Q add unrelated | |
65 | $ cvsci -m"unrelated change" |
|
66 | $ cvsci -m"unrelated change" | |
66 | cvs commit: Examining . |
|
67 | cvs commit: Examining . | |
67 |
|
68 | |||
68 | merge file1 to v1_1 |
|
69 | merge file1 to v1_1 | |
69 |
|
70 | |||
70 | $ cvscall -Q update -jv1_0 |
|
71 | $ cvscall -Q update -jv1_0 | |
71 | RCS file: */cvsrepo/proj/file1,v (glob) |
|
72 | RCS file: */cvsrepo/proj/file1,v (glob) | |
72 | retrieving revision 1.1 |
|
73 | retrieving revision 1.1 | |
73 | retrieving revision 1.1.2.1 |
|
74 | retrieving revision 1.1.2.1 | |
74 | Merging differences between 1.1 and 1.1.2.1 into file1 |
|
75 | Merging differences between 1.1 and 1.1.2.1 into file1 | |
75 | $ cvsci -m"add text [MERGE from v1_0]" |
|
76 | $ cvsci -m"add text [MERGE from v1_0]" | |
76 | cvs commit: Examining . |
|
77 | cvs commit: Examining . | |
77 |
|
78 | |||
78 | merge change to trunk |
|
79 | merge change to trunk | |
79 |
|
80 | |||
80 | $ cvscall -Q update -A |
|
81 | $ cvscall -Q update -A | |
81 | $ cvscall -Q update -jv1_1 |
|
82 | $ cvscall -Q update -jv1_1 | |
82 | RCS file: */cvsrepo/proj/file1,v (glob) |
|
83 | RCS file: */cvsrepo/proj/file1,v (glob) | |
83 | retrieving revision 1.1 |
|
84 | retrieving revision 1.1 | |
84 | retrieving revision 1.1.4.1 |
|
85 | retrieving revision 1.1.4.1 | |
85 | Merging differences between 1.1 and 1.1.4.1 into file1 |
|
86 | Merging differences between 1.1 and 1.1.4.1 into file1 | |
86 | $ cvsci -m"add text [MERGE from v1_1]" |
|
87 | $ cvsci -m"add text [MERGE from v1_1]" | |
87 | cvs commit: Examining . |
|
88 | cvs commit: Examining . | |
88 |
|
89 | |||
89 | non-merged change on trunk |
|
90 | non-merged change on trunk | |
90 |
|
91 | |||
91 | $ echo "foo" > file2 |
|
92 | $ echo "foo" > file2 | |
92 | $ cvscall -Q add file2 |
|
93 | $ cvscall -Q add file2 | |
93 | $ cvsci -m"add file2 on trunk" file2 |
|
94 | $ cvsci -m"add file2 on trunk" file2 | |
94 |
|
95 | |||
95 | this will create rev 1.3 |
|
96 | this will create rev 1.3 | |
96 | change on trunk to backport |
|
97 | change on trunk to backport | |
97 |
|
98 | |||
|
99 | $ sleep 1 | |||
98 | $ echo "backport me" >> file1 |
|
100 | $ echo "backport me" >> file1 | |
99 | $ cvsci -m"add other text" file1 |
|
101 | $ cvsci -m"add other text" file1 | |
100 | $ cvscall log file1 |
|
102 | $ cvscall log file1 | |
101 |
|
103 | |||
102 | RCS file: */cvsrepo/proj/file1,v (glob) |
|
104 | RCS file: */cvsrepo/proj/file1,v (glob) | |
103 | Working file: file1 |
|
105 | Working file: file1 | |
104 | head: 1.3 |
|
106 | head: 1.3 | |
105 | branch: |
|
107 | branch: | |
106 | locks: strict |
|
108 | locks: strict | |
107 | access list: |
|
109 | access list: | |
108 | symbolic names: |
|
110 | symbolic names: | |
109 | v1_1: 1.1.0.4 |
|
111 | v1_1: 1.1.0.4 | |
110 | v1_0: 1.1.0.2 |
|
112 | v1_0: 1.1.0.2 | |
111 | keyword substitution: kv |
|
113 | keyword substitution: kv | |
112 | total revisions: 5; selected revisions: 5 |
|
114 | total revisions: 5; selected revisions: 5 | |
113 | description: |
|
115 | description: | |
114 | ---------------------------- |
|
116 | ---------------------------- | |
115 | revision 1.3 |
|
117 | revision 1.3 | |
116 | date: * (glob) |
|
118 | date: * (glob) | |
117 | add other text |
|
119 | add other text | |
118 | ---------------------------- |
|
120 | ---------------------------- | |
119 | revision 1.2 |
|
121 | revision 1.2 | |
120 | date: * (glob) |
|
122 | date: * (glob) | |
121 | add text [MERGE from v1_1] |
|
123 | add text [MERGE from v1_1] | |
122 | ---------------------------- |
|
124 | ---------------------------- | |
123 | revision 1.1 |
|
125 | revision 1.1 | |
124 | date: * (glob) |
|
126 | date: * (glob) | |
125 | branches: 1.1.2; 1.1.4; |
|
127 | branches: 1.1.2; 1.1.4; | |
126 | add file1 on trunk |
|
128 | add file1 on trunk | |
127 | ---------------------------- |
|
129 | ---------------------------- | |
128 | revision 1.1.4.1 |
|
130 | revision 1.1.4.1 | |
129 | date: * (glob) |
|
131 | date: * (glob) | |
130 | add text [MERGE from v1_0] |
|
132 | add text [MERGE from v1_0] | |
131 | ---------------------------- |
|
133 | ---------------------------- | |
132 | revision 1.1.2.1 |
|
134 | revision 1.1.2.1 | |
133 | date: * (glob) |
|
135 | date: * (glob) | |
134 | add text |
|
136 | add text | |
135 | ============================================================================= |
|
137 | ============================================================================= | |
136 |
|
138 | |||
137 | XXX how many ways are there to spell "trunk" with CVS? |
|
139 | XXX how many ways are there to spell "trunk" with CVS? | |
138 | backport trunk change to v1_1 |
|
140 | backport trunk change to v1_1 | |
139 |
|
141 | |||
140 | $ cvscall -Q update -rv1_1 |
|
142 | $ cvscall -Q update -rv1_1 | |
141 | $ cvscall -Q update -j1.2 -j1.3 file1 |
|
143 | $ cvscall -Q update -j1.2 -j1.3 file1 | |
142 | RCS file: */cvsrepo/proj/file1,v (glob) |
|
144 | RCS file: */cvsrepo/proj/file1,v (glob) | |
143 | retrieving revision 1.2 |
|
145 | retrieving revision 1.2 | |
144 | retrieving revision 1.3 |
|
146 | retrieving revision 1.3 | |
145 | Merging differences between 1.2 and 1.3 into file1 |
|
147 | Merging differences between 1.2 and 1.3 into file1 | |
146 | $ cvsci -m"add other text [MERGE from HEAD]" file1 |
|
148 | $ cvsci -m"add other text [MERGE from HEAD]" file1 | |
147 |
|
149 | |||
148 | fix bug on v1_1, merge to trunk with error |
|
150 | fix bug on v1_1, merge to trunk with error | |
149 |
|
151 | |||
150 | $ cvscall -Q update -rv1_1 |
|
152 | $ cvscall -Q update -rv1_1 | |
|
153 | $ sleep 1 | |||
151 | $ echo "merge forward" >> file1 |
|
154 | $ echo "merge forward" >> file1 | |
152 | $ cvscall -Q tag unmerged |
|
155 | $ cvscall -Q tag unmerged | |
153 | $ cvsci -m"fix file1" |
|
156 | $ cvsci -m"fix file1" | |
154 | cvs commit: Examining . |
|
157 | cvs commit: Examining . | |
155 | $ cvscall -Q update -A |
|
158 | $ cvscall -Q update -A | |
156 | $ cvscall -Q update -junmerged -jv1_1 |
|
159 | $ cvscall -Q update -junmerged -jv1_1 | |
157 | RCS file: */cvsrepo/proj/file1,v (glob) |
|
160 | RCS file: */cvsrepo/proj/file1,v (glob) | |
158 | retrieving revision 1.1.4.2 |
|
161 | retrieving revision 1.1.4.2 | |
159 | retrieving revision 1.1.4.3 |
|
162 | retrieving revision 1.1.4.3 | |
160 | Merging differences between 1.1.4.2 and 1.1.4.3 into file1 |
|
163 | Merging differences between 1.1.4.2 and 1.1.4.3 into file1 | |
161 |
|
164 | |||
162 | note the typo in the commit log message |
|
165 | note the typo in the commit log message | |
163 |
|
166 | |||
164 | $ cvsci -m"fix file1 [MERGE from v1-1]" |
|
167 | $ cvsci -m"fix file1 [MERGE from v1-1]" | |
165 | cvs commit: Examining . |
|
168 | cvs commit: Examining . | |
166 | $ cvs -Q tag -d unmerged |
|
169 | $ cvs -Q tag -d unmerged | |
167 |
|
170 | |||
168 | convert to hg |
|
171 | convert to hg | |
169 |
|
172 | |||
170 | $ cd .. |
|
173 | $ cd .. | |
171 | $ hg convert proj proj.hg |
|
174 | $ hg convert proj proj.hg | |
172 | initializing destination proj.hg repository |
|
175 | initializing destination proj.hg repository | |
173 | connecting to */cvsrepo (glob) |
|
176 | connecting to */cvsrepo (glob) | |
174 | scanning source... |
|
177 | scanning source... | |
175 | collecting CVS rlog |
|
178 | collecting CVS rlog | |
176 | 12 log entries |
|
179 | 12 log entries | |
177 | creating changesets |
|
180 | creating changesets | |
178 | warning: CVS commit message references non-existent branch 'v1-1': |
|
181 | warning: CVS commit message references non-existent branch 'v1-1': | |
179 | fix file1 [MERGE from v1-1] |
|
182 | fix file1 [MERGE from v1-1] | |
180 | 10 changeset entries |
|
183 | 10 changeset entries | |
181 | sorting... |
|
184 | sorting... | |
182 | converting... |
|
185 | converting... | |
183 | 9 add file1 on trunk |
|
186 | 9 add file1 on trunk | |
184 | 8 add text |
|
187 | 8 add text | |
185 | 7 unrelated change |
|
188 | 7 unrelated change | |
186 | 6 add text [MERGE from v1_0] |
|
189 | 6 add text [MERGE from v1_0] | |
187 | 5 add text [MERGE from v1_1] |
|
190 | 5 add text [MERGE from v1_1] | |
188 | 4 add file2 on trunk |
|
191 | 4 add file2 on trunk | |
189 | 3 add other text |
|
192 | 3 add other text | |
190 | 2 add other text [MERGE from HEAD] |
|
193 | 2 add other text [MERGE from HEAD] | |
191 | 1 fix file1 |
|
194 | 1 fix file1 | |
192 | 0 fix file1 [MERGE from v1-1] |
|
195 | 0 fix file1 [MERGE from v1-1] | |
193 |
|
196 | |||
194 | complete log |
|
197 | complete log | |
195 |
|
198 | |||
196 | $ template="{rev}: '{branches}' {desc}\n" |
|
199 | $ template="{rev}: '{branches}' {desc}\n" | |
197 | $ hg -R proj.hg log --template="$template" |
|
200 | $ hg -R proj.hg log --template="$template" | |
198 | 9: '' fix file1 [MERGE from v1-1] |
|
201 | 9: '' fix file1 [MERGE from v1-1] | |
199 | 8: 'v1_1' fix file1 |
|
202 | 8: 'v1_1' fix file1 | |
200 | 7: 'v1_1' add other text [MERGE from HEAD] |
|
203 | 7: 'v1_1' add other text [MERGE from HEAD] | |
201 | 6: '' add other text |
|
204 | 6: '' add other text | |
202 | 5: '' add file2 on trunk |
|
205 | 5: '' add file2 on trunk | |
203 | 4: '' add text [MERGE from v1_1] |
|
206 | 4: '' add text [MERGE from v1_1] | |
204 | 3: 'v1_1' add text [MERGE from v1_0] |
|
207 | 3: 'v1_1' add text [MERGE from v1_0] | |
205 | 2: 'v1_1' unrelated change |
|
208 | 2: 'v1_1' unrelated change | |
206 | 1: 'v1_0' add text |
|
209 | 1: 'v1_0' add text | |
207 | 0: '' add file1 on trunk |
|
210 | 0: '' add file1 on trunk | |
208 |
|
211 | |||
209 | graphical log |
|
212 | graphical log | |
210 |
|
213 | |||
211 | $ hg -R proj.hg glog --template="$template" |
|
214 | $ hg -R proj.hg glog --template="$template" | |
212 | o 9: '' fix file1 [MERGE from v1-1] |
|
215 | o 9: '' fix file1 [MERGE from v1-1] | |
213 | | |
|
216 | | | |
214 | | o 8: 'v1_1' fix file1 |
|
217 | | o 8: 'v1_1' fix file1 | |
215 | | | |
|
218 | | | | |
216 | | o 7: 'v1_1' add other text [MERGE from HEAD] |
|
219 | | o 7: 'v1_1' add other text [MERGE from HEAD] | |
217 | |/| |
|
220 | |/| | |
218 | o | 6: '' add other text |
|
221 | o | 6: '' add other text | |
219 | | | |
|
222 | | | | |
220 | o | 5: '' add file2 on trunk |
|
223 | o | 5: '' add file2 on trunk | |
221 | | | |
|
224 | | | | |
222 | o | 4: '' add text [MERGE from v1_1] |
|
225 | o | 4: '' add text [MERGE from v1_1] | |
223 | |\| |
|
226 | |\| | |
224 | | o 3: 'v1_1' add text [MERGE from v1_0] |
|
227 | | o 3: 'v1_1' add text [MERGE from v1_0] | |
225 | | |\ |
|
228 | | |\ | |
226 | +---o 2: 'v1_1' unrelated change |
|
229 | +---o 2: 'v1_1' unrelated change | |
227 | | | |
|
230 | | | | |
228 | | o 1: 'v1_0' add text |
|
231 | | o 1: 'v1_0' add text | |
229 | |/ |
|
232 | |/ | |
230 | o 0: '' add file1 on trunk |
|
233 | o 0: '' add file1 on trunk | |
231 |
|
234 |
General Comments 0
You need to be logged in to leave comments.
Login now