##// END OF EJS Templates
tests: split out separate test for issue5020...
Martin von Zweigbergk -
r42330:f2fe7cf4 default
parent child Browse files
Show More
@@ -11,15 +11,9 b' Criss cross merging'
11 11
12 12 $ hg up -qr0
13 13 $ echo '2 first change' > f2
14 $ mkdir d1
15 $ echo '0 base' > d1/f3
16 $ echo '0 base' > d1/f4
17 $ hg add -q d1
18 14 $ hg ci -qm '2 first change f2'
19 15
20 16 $ hg merge -qr 1
21 $ hg rm d1/f3
22 $ hg mv -q d1 d2
23 17 $ hg ci -m '3 merge'
24 18
25 19 $ hg up -qr2
@@ -30,38 +24,38 b' Criss cross merging'
30 24 $ hg ci -m '5 second change f1'
31 25
32 26 $ hg up -r3
33 2 files updated, 0 files merged, 2 files removed, 0 files unresolved
27 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
34 28 $ echo '6 second change' > f2
35 29 $ hg ci -m '6 second change f2'
36 30
37 31 $ hg log -G
38 @ changeset: 6:6373bbfdae1d
32 @ changeset: 6:3b08d01b0ab5
39 33 | tag: tip
40 | parent: 3:c202c8af058d
34 | parent: 3:cf89f02107e5
41 35 | user: test
42 36 | date: Thu Jan 01 00:00:00 1970 +0000
43 37 | summary: 6 second change f2
44 38 |
45 | o changeset: 5:e673248094b1
39 | o changeset: 5:adfe50279922
46 40 | | user: test
47 41 | | date: Thu Jan 01 00:00:00 1970 +0000
48 42 | | summary: 5 second change f1
49 43 | |
50 | o changeset: 4:177f58377c06
51 | |\ parent: 2:d1d156401c1b
44 | o changeset: 4:7d3e55501ae6
45 | |\ parent: 2:40663881a6dd
52 46 | | | parent: 1:0f6b37dbe527
53 47 | | | user: test
54 48 | | | date: Thu Jan 01 00:00:00 1970 +0000
55 49 | | | summary: 4 merge
56 50 | | |
57 o---+ changeset: 3:c202c8af058d
58 | | | parent: 2:d1d156401c1b
51 o---+ changeset: 3:cf89f02107e5
52 | | | parent: 2:40663881a6dd
59 53 |/ / parent: 1:0f6b37dbe527
60 54 | | user: test
61 55 | | date: Thu Jan 01 00:00:00 1970 +0000
62 56 | | summary: 3 merge
63 57 | |
64 | o changeset: 2:d1d156401c1b
58 | o changeset: 2:40663881a6dd
65 59 | | parent: 0:40494bf2444c
66 60 | | user: test
67 61 | | date: Thu Jan 01 00:00:00 1970 +0000
@@ -79,51 +73,27 b' Criss cross merging'
79 73
80 74
81 75 $ hg merge -v --debug --tool internal:dump 5 --config merge.preferancestor='!'
82 note: using 0f6b37dbe527 as ancestor of 6373bbfdae1d and e673248094b1
83 alternatively, use --config merge.preferancestor=d1d156401c1b
76 note: using 0f6b37dbe527 as ancestor of 3b08d01b0ab5 and adfe50279922
77 alternatively, use --config merge.preferancestor=40663881a6dd
84 78 searching for copies back to rev 3
85 unmatched files in local:
86 d2/f4
87 unmatched files in other:
88 d1/f3
89 d1/f4
90 all copies found (* = to merge, ! = divergent, % = renamed and deleted):
91 src: 'd1/f4' -> dst: 'd2/f4'
92 checking for directory renames
93 discovered dir src: 'd1/' -> dst: 'd2/'
94 pending file src: 'd1/f3' -> dst: 'd2/f3'
95 pending file src: 'd1/f4' -> dst: 'd2/f4'
96 79 resolving manifests
97 80 branchmerge: True, force: False, partial: False
98 ancestor: 0f6b37dbe527, local: 6373bbfdae1d+, remote: e673248094b1
99 preserving d2/f4 for resolve of d2/f4
81 ancestor: 0f6b37dbe527, local: 3b08d01b0ab5+, remote: adfe50279922
100 82 preserving f2 for resolve of f2
101 83 f1: remote is newer -> g
102 84 getting f1
103 d2/f3: local directory rename - get from d1/f3 -> dg
104 getting d1/f3 to d2/f3
105 d2/f4: local directory rename, both created -> m (premerge)
106 85 f2: versions differ -> m (premerge)
107 86 picked tool ':dump' for f2 (binary False symlink False changedelete False)
108 87 merging f2
109 my f2@6373bbfdae1d+ other f2@e673248094b1 ancestor f2@0f6b37dbe527
88 my f2@3b08d01b0ab5+ other f2@adfe50279922 ancestor f2@0f6b37dbe527
110 89 f2: versions differ -> m (merge)
111 90 picked tool ':dump' for f2 (binary False symlink False changedelete False)
112 my f2@6373bbfdae1d+ other f2@e673248094b1 ancestor f2@0f6b37dbe527
113 3 files updated, 0 files merged, 0 files removed, 1 files unresolved
91 my f2@3b08d01b0ab5+ other f2@adfe50279922 ancestor f2@0f6b37dbe527
92 1 files updated, 0 files merged, 0 files removed, 1 files unresolved
114 93 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
115 94 [1]
116 95
117 $ f --dump --recurse *
118 d2: directory with 2 files
119 d2/f3:
120 >>>
121 0 base
122 <<<
123 d2/f4:
124 >>>
125 0 base
126 <<<
96 $ f --dump *
127 97 f1:
128 98 >>>
129 99 5 second change
@@ -151,13 +121,11 b' Criss cross merging'
151 121
152 122 $ hg up -qC .
153 123 $ hg merge -v --tool internal:dump 5 --config merge.preferancestor="null 40663881 3b08d"
154 note: using 0f6b37dbe527 as ancestor of 6373bbfdae1d and e673248094b1
155 alternatively, use --config merge.preferancestor=d1d156401c1b
124 note: using 40663881a6dd as ancestor of 3b08d01b0ab5 and adfe50279922
125 alternatively, use --config merge.preferancestor=0f6b37dbe527
156 126 resolving manifests
157 getting f1
158 getting d1/f3 to d2/f3
159 merging f2
160 3 files updated, 0 files merged, 0 files removed, 1 files unresolved
127 merging f1
128 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
161 129 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
162 130 [1]
163 131
@@ -166,70 +134,36 b' Redo merge with merge.preferancestor="*"'
166 134 $ rm f*
167 135 $ hg up -qC .
168 136 $ hg merge -v --debug --tool internal:dump 5 --config merge.preferancestor="*"
169 note: merging 6373bbfdae1d+ and e673248094b1 using bids from ancestors 0f6b37dbe527 and d1d156401c1b
137 note: merging 3b08d01b0ab5+ and adfe50279922 using bids from ancestors 0f6b37dbe527 and 40663881a6dd
170 138
171 139 calculating bids for ancestor 0f6b37dbe527
172 140 searching for copies back to rev 3
173 unmatched files in local:
174 d2/f4
175 unmatched files in other:
176 d1/f3
177 d1/f4
178 all copies found (* = to merge, ! = divergent, % = renamed and deleted):
179 src: 'd1/f4' -> dst: 'd2/f4'
180 checking for directory renames
181 discovered dir src: 'd1/' -> dst: 'd2/'
182 pending file src: 'd1/f3' -> dst: 'd2/f3'
183 pending file src: 'd1/f4' -> dst: 'd2/f4'
184 141 resolving manifests
185 142 branchmerge: True, force: False, partial: False
186 ancestor: 0f6b37dbe527, local: 6373bbfdae1d+, remote: e673248094b1
187 d2/f3: local directory rename - get from d1/f3 -> dg
188 d2/f4: local directory rename, both created -> m
143 ancestor: 0f6b37dbe527, local: 3b08d01b0ab5+, remote: adfe50279922
189 144 f1: remote is newer -> g
190 145 f2: versions differ -> m
191 146
192 calculating bids for ancestor d1d156401c1b
147 calculating bids for ancestor 40663881a6dd
193 148 searching for copies back to rev 3
194 unmatched files in local:
195 d2/f4
196 all copies found (* = to merge, ! = divergent, % = renamed and deleted):
197 src: 'd1/f4' -> dst: 'd2/f4'
198 checking for directory renames
199 discovered dir src: 'd1/' -> dst: 'd2/'
200 149 resolving manifests
201 150 branchmerge: True, force: False, partial: False
202 ancestor: d1d156401c1b, local: 6373bbfdae1d+, remote: e673248094b1
151 ancestor: 40663881a6dd, local: 3b08d01b0ab5+, remote: adfe50279922
203 152 f1: versions differ -> m
204 153 f2: remote unchanged -> k
205 154
206 155 auction for merging merge bids
207 d2/f3: consensus for dg
208 d2/f4: consensus for m
209 156 f1: picking 'get' action
210 157 f2: picking 'keep' action
211 158 end of auction
212 159
213 preserving d2/f4 for resolve of d2/f4
214 160 f1: remote is newer -> g
215 161 getting f1
216 162 f2: remote unchanged -> k
217 d2/f3: local directory rename - get from d1/f3 -> dg
218 getting d1/f3 to d2/f3
219 d2/f4: local directory rename, both created -> m (premerge)
220 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
163 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
221 164 (branch merge, don't forget to commit)
222 165
223 $ f --dump --recurse *
224 d2: directory with 2 files
225 d2/f3:
226 >>>
227 0 base
228 <<<
229 d2/f4:
230 >>>
231 0 base
232 <<<
166 $ f --dump *
233 167 f1:
234 168 >>>
235 169 5 second change
@@ -243,79 +177,38 b' Redo merge with merge.preferancestor="*"'
243 177 The other way around:
244 178
245 179 $ hg up -C -r5
246 4 files updated, 0 files merged, 1 files removed, 0 files unresolved
180 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
247 181 $ hg merge -v --debug --config merge.preferancestor="*"
248 note: merging e673248094b1+ and 6373bbfdae1d using bids from ancestors 0f6b37dbe527 and d1d156401c1b
182 note: merging adfe50279922+ and 3b08d01b0ab5 using bids from ancestors 0f6b37dbe527 and 40663881a6dd
249 183
250 184 calculating bids for ancestor 0f6b37dbe527
251 185 searching for copies back to rev 3
252 unmatched files in local:
253 d1/f3
254 d1/f4
255 unmatched files in other:
256 d2/f4
257 all copies found (* = to merge, ! = divergent, % = renamed and deleted):
258 src: 'd1/f4' -> dst: 'd2/f4'
259 checking for directory renames
260 discovered dir src: 'd1/' -> dst: 'd2/'
261 pending file src: 'd1/f3' -> dst: 'd2/f3'
262 pending file src: 'd1/f4' -> dst: 'd2/f4'
263 186 resolving manifests
264 187 branchmerge: True, force: False, partial: False
265 ancestor: 0f6b37dbe527, local: e673248094b1+, remote: 6373bbfdae1d
266 d2/f3: remote directory rename - move from d1/f3 -> dm
267 d2/f4: remote directory rename, both created -> m
188 ancestor: 0f6b37dbe527, local: adfe50279922+, remote: 3b08d01b0ab5
268 189 f1: remote unchanged -> k
269 190 f2: versions differ -> m
270 191
271 calculating bids for ancestor d1d156401c1b
192 calculating bids for ancestor 40663881a6dd
272 193 searching for copies back to rev 3
273 unmatched files in other:
274 d2/f4
275 all copies found (* = to merge, ! = divergent, % = renamed and deleted):
276 src: 'd1/f4' -> dst: 'd2/f4'
277 checking for directory renames
278 discovered dir src: 'd1/' -> dst: 'd2/'
279 194 resolving manifests
280 195 branchmerge: True, force: False, partial: False
281 ancestor: d1d156401c1b, local: e673248094b1+, remote: 6373bbfdae1d
282 d1/f3: other deleted -> r
283 d1/f4: other deleted -> r
284 d2/f4: remote created -> g
196 ancestor: 40663881a6dd, local: adfe50279922+, remote: 3b08d01b0ab5
285 197 f1: versions differ -> m
286 198 f2: remote is newer -> g
287 199
288 200 auction for merging merge bids
289 d1/f3: consensus for r
290 d1/f4: consensus for r
291 d2/f3: consensus for dm
292 d2/f4: picking 'get' action
293 201 f1: picking 'keep' action
294 202 f2: picking 'get' action
295 203 end of auction
296 204
297 d1/f3: other deleted -> r
298 removing d1/f3
299 d1/f4: other deleted -> r
300 removing d1/f4
301 d2/f4: remote created -> g
302 getting d2/f4
303 205 f2: remote is newer -> g
304 206 getting f2
305 207 f1: remote unchanged -> k
306 2 files updated, 0 files merged, 2 files removed, 0 files unresolved
208 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
307 209 (branch merge, don't forget to commit)
308 210
309 $ f --dump --recurse *
310 d2: directory with 2 files
311 d2/f3:
312 >>>
313 0 base
314 <<<
315 d2/f4:
316 >>>
317 0 base
318 <<<
211 $ f --dump *
319 212 f1:
320 213 >>>
321 214 5 second change
@@ -329,85 +222,57 b' Verify how the output looks and and how '
329 222
330 223 $ hg up -qC
331 224 $ hg merge
332 2 files updated, 0 files merged, 2 files removed, 0 files unresolved
225 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
333 226 (branch merge, don't forget to commit)
334 227
335 228 $ hg up -qC tip
336 229 $ hg merge -v
337 note: merging 6373bbfdae1d+ and e673248094b1 using bids from ancestors 0f6b37dbe527 and d1d156401c1b
230 note: merging 3b08d01b0ab5+ and adfe50279922 using bids from ancestors 0f6b37dbe527 and 40663881a6dd
338 231
339 232 calculating bids for ancestor 0f6b37dbe527
340 233 resolving manifests
341 234
342 calculating bids for ancestor d1d156401c1b
235 calculating bids for ancestor 40663881a6dd
343 236 resolving manifests
344 237
345 238 auction for merging merge bids
346 d2/f3: consensus for dg
347 d2/f4: consensus for m
348 239 f1: picking 'get' action
349 240 f2: picking 'keep' action
350 241 end of auction
351 242
352 243 getting f1
353 getting d1/f3 to d2/f3
354 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
244 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
355 245 (branch merge, don't forget to commit)
356 246
357 247 $ hg up -qC
358 248 $ hg merge -v --debug --config merge.preferancestor="*"
359 note: merging 6373bbfdae1d+ and e673248094b1 using bids from ancestors 0f6b37dbe527 and d1d156401c1b
249 note: merging 3b08d01b0ab5+ and adfe50279922 using bids from ancestors 0f6b37dbe527 and 40663881a6dd
360 250
361 251 calculating bids for ancestor 0f6b37dbe527
362 252 searching for copies back to rev 3
363 unmatched files in local:
364 d2/f4
365 unmatched files in other:
366 d1/f3
367 d1/f4
368 all copies found (* = to merge, ! = divergent, % = renamed and deleted):
369 src: 'd1/f4' -> dst: 'd2/f4'
370 checking for directory renames
371 discovered dir src: 'd1/' -> dst: 'd2/'
372 pending file src: 'd1/f3' -> dst: 'd2/f3'
373 pending file src: 'd1/f4' -> dst: 'd2/f4'
374 253 resolving manifests
375 254 branchmerge: True, force: False, partial: False
376 ancestor: 0f6b37dbe527, local: 6373bbfdae1d+, remote: e673248094b1
377 d2/f3: local directory rename - get from d1/f3 -> dg
378 d2/f4: local directory rename, both created -> m
255 ancestor: 0f6b37dbe527, local: 3b08d01b0ab5+, remote: adfe50279922
379 256 f1: remote is newer -> g
380 257 f2: versions differ -> m
381 258
382 calculating bids for ancestor d1d156401c1b
259 calculating bids for ancestor 40663881a6dd
383 260 searching for copies back to rev 3
384 unmatched files in local:
385 d2/f4
386 all copies found (* = to merge, ! = divergent, % = renamed and deleted):
387 src: 'd1/f4' -> dst: 'd2/f4'
388 checking for directory renames
389 discovered dir src: 'd1/' -> dst: 'd2/'
390 261 resolving manifests
391 262 branchmerge: True, force: False, partial: False
392 ancestor: d1d156401c1b, local: 6373bbfdae1d+, remote: e673248094b1
263 ancestor: 40663881a6dd, local: 3b08d01b0ab5+, remote: adfe50279922
393 264 f1: versions differ -> m
394 265 f2: remote unchanged -> k
395 266
396 267 auction for merging merge bids
397 d2/f3: consensus for dg
398 d2/f4: consensus for m
399 268 f1: picking 'get' action
400 269 f2: picking 'keep' action
401 270 end of auction
402 271
403 preserving d2/f4 for resolve of d2/f4
404 272 f1: remote is newer -> g
405 273 getting f1
406 274 f2: remote unchanged -> k
407 d2/f3: local directory rename - get from d1/f3 -> dg
408 getting d1/f3 to d2/f3
409 d2/f4: local directory rename, both created -> m (premerge)
410 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
275 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
411 276 (branch merge, don't forget to commit)
412 277
413 278 Test the greatest common ancestor returning multiple changesets
@@ -418,7 +283,7 b' Test the greatest common ancestor return'
418 283 date: Thu Jan 01 00:00:00 1970 +0000
419 284 summary: 1 first change f1
420 285
421 changeset: 2:d1d156401c1b
286 changeset: 2:40663881a6dd
422 287 parent: 0:40494bf2444c
423 288 user: test
424 289 date: Thu Jan 01 00:00:00 1970 +0000
@@ -513,3 +378,90 b' Verify that the old context ancestor wor'
513 378 2
514 379
515 380 $ cd ..
381
382 $ hg init issue5020
383 $ cd issue5020
384
385 $ echo a > noop
386 $ hg ci -qAm initial
387
388 $ echo b > noop
389 $ hg ci -qAm 'uninteresting change'
390
391 $ hg up -q 0
392 $ mkdir d1
393 $ echo a > d1/a
394 $ echo b > d1/b
395 $ hg ci -qAm 'add d1/a and d1/b'
396
397 $ hg merge -q 1
398 $ hg rm d1/a
399 $ hg mv -q d1 d2
400 $ hg ci -qm 'merge while removing d1/a and moving d1/b to d2/b'
401
402 $ hg up -q 1
403 $ hg merge -q 2
404 $ hg ci -qm 'merge (no changes while merging)'
405 $ hg log -G -T '{rev}:{node|short} {desc}'
406 @ 4:c0ef19750a22 merge (no changes while merging)
407 |\
408 +---o 3:6ca01f7342b9 merge while removing d1/a and moving d1/b to d2/b
409 | |/
410 | o 2:154e6000f54e add d1/a and d1/b
411 | |
412 o | 1:11b5b303e36c uninteresting change
413 |/
414 o 0:7b54db1ebf33 initial
415
416 $ hg merge 3 --debug
417 note: merging c0ef19750a22+ and 6ca01f7342b9 using bids from ancestors 11b5b303e36c and 154e6000f54e
418
419 calculating bids for ancestor 11b5b303e36c
420 searching for copies back to rev 3
421 unmatched files in local:
422 d1/a
423 d1/b
424 unmatched files in other:
425 d2/b
426 all copies found (* = to merge, ! = divergent, % = renamed and deleted):
427 src: 'd1/b' -> dst: 'd2/b'
428 checking for directory renames
429 discovered dir src: 'd1/' -> dst: 'd2/'
430 pending file src: 'd1/a' -> dst: 'd2/a'
431 pending file src: 'd1/b' -> dst: 'd2/b'
432 resolving manifests
433 branchmerge: True, force: False, partial: False
434 ancestor: 11b5b303e36c, local: c0ef19750a22+, remote: 6ca01f7342b9
435 d2/a: remote directory rename - move from d1/a -> dm
436 d2/b: remote directory rename, both created -> m
437
438 calculating bids for ancestor 154e6000f54e
439 searching for copies back to rev 3
440 unmatched files in other:
441 d2/b
442 all copies found (* = to merge, ! = divergent, % = renamed and deleted):
443 src: 'd1/b' -> dst: 'd2/b'
444 checking for directory renames
445 discovered dir src: 'd1/' -> dst: 'd2/'
446 resolving manifests
447 branchmerge: True, force: False, partial: False
448 ancestor: 154e6000f54e, local: c0ef19750a22+, remote: 6ca01f7342b9
449 d1/a: other deleted -> r
450 d1/b: other deleted -> r
451 d2/b: remote created -> g
452
453 auction for merging merge bids
454 d1/a: consensus for r
455 d1/b: consensus for r
456 d2/a: consensus for dm
457 d2/b: picking 'get' action
458 end of auction
459
460 d1/a: other deleted -> r
461 removing d1/a
462 d1/b: other deleted -> r
463 removing d1/b
464 d2/b: remote created -> g
465 getting d2/b
466 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
467 (branch merge, don't forget to commit)
General Comments 0
You need to be logged in to leave comments. Login now