##// END OF EJS Templates
copies-tests: add a test with a rename overwriting another file...
marmoute -
r44943:890def17 default
parent child Browse files
Show More
@@ -299,6 +299,55 b' Note:'
299 | This lead to bad copy tracing information to be dug up.
299 | This lead to bad copy tracing information to be dug up.
300
300
301
301
302 Merge:
303 - one with change to an unrelated file (b)
304 - one overwriting a file (d) with a rename (from h to i to d)
305
306 $ hg up 'desc("i-2")'
307 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
308 $ hg mv h i
309 $ hg commit -m "f-1: rename h -> i"
310 created new head
311 $ hg mv --force i d
312 $ hg commit -m "f-2: rename i -> d"
313 $ hg debugindex d
314 rev linkrev nodeid p1 p2
315 0 2 01c2f5eabdc4 000000000000 000000000000
316 1 10 b004912a8510 000000000000 000000000000
317 2 15 0bb5445dc4d0 01c2f5eabdc4 b004912a8510
318 3 22 c72365ee036f 000000000000 000000000000
319 $ hg up 'desc("b-1")'
320 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
321 $ hg merge 'desc("f-2")'
322 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
323 (branch merge, don't forget to commit)
324 $ hg ci -m 'mBFm-0 simple merge - one way'
325 $ hg up 'desc("f-2")'
326 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
327 $ hg merge 'desc("b-1")'
328 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
329 (branch merge, don't forget to commit)
330 $ hg ci -m 'mFBm-0 simple merge - the other way'
331 created new head
332 $ hg log -G --rev '::(desc("mBFm")+desc("mFBm"))'
333 @ 24 mFBm-0 simple merge - the other way]
334 |\
335 +---o 23 mBFm-0 simple merge - one way]
336 | |/
337 | o 22 f-2: rename i -> d]
338 | |
339 | o 21 f-1: rename h -> i]
340 | |
341 o | 5 b-1: b update]
342 |/
343 o 2 i-2: c -move-> d]
344 |
345 o 1 i-1: a -move-> c]
346 |
347 o 0 i-0 initial commit: a b h]
348
349
350
302 Check results
351 Check results
303 =============
352 =============
304
353
@@ -448,6 +497,8 b' not a merge.'
448 0 2 01c2f5eabdc4 000000000000 000000000000
497 0 2 01c2f5eabdc4 000000000000 000000000000
449 1 10 b004912a8510 000000000000 000000000000
498 1 10 b004912a8510 000000000000 000000000000
450 2 15 0bb5445dc4d0 01c2f5eabdc4 b004912a8510
499 2 15 0bb5445dc4d0 01c2f5eabdc4 b004912a8510
500 3 22 c72365ee036f 000000000000 000000000000
501 4 23 863d9bc49190 01c2f5eabdc4 c72365ee036f
451
502
452 (This `hg log` output if wrong, since no merge actually happened).
503 (This `hg log` output if wrong, since no merge actually happened).
453
504
@@ -539,3 +590,68 b' Comparing with a merge with colliding re'
539 a
590 a
540 R a
591 R a
541 R b
592 R b
593
594 Merge:
595 - one with change to an unrelated file (b)
596 - one overwriting a file (d) with a rename (from h to i to d)
597
598 The overwriting should take over. However, the behavior is currently buggy
599
600 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBFm-0")'
601 M b
602 A d
603 a (true !)
604 h (false !)
605 R a
606 R h
607 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFBm-0")'
608 M b
609 A d
610 h
611 R a
612 R h
613 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBFm-0")'
614 M d
615 R h
616 $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mBFm-0")'
617 M b
618 M d
619 $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mBFm-0")'
620 M b
621 M d
622 R i
623 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mFBm-0")'
624 M d
625 R h
626 $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFBm-0")'
627 M b
628 $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFBm-0")'
629 M b
630 M d
631 R i
632
633 The following graphlog is wrong, the "a -> c -> d" chain was overwritten and should not appear.
634
635 $ hg log -Gfr 'desc("mBFm-0")' d
636 o 23 mBFm-0 simple merge - one way]
637 |\
638 o : 22 f-2: rename i -> d]
639 | :
640 o : 21 f-1: rename h -> i]
641 :/
642 o 2 i-2: c -move-> d]
643 |
644 o 1 i-1: a -move-> c]
645 |
646 o 0 i-0 initial commit: a b h]
647
648
649 The following output is correct.
650
651 $ hg log -Gfr 'desc("mFBm-0")' d
652 o 22 f-2: rename i -> d]
653 |
654 o 21 f-1: rename h -> i]
655 :
656 o 0 i-0 initial commit: a b h]
657
General Comments 0
You need to be logged in to leave comments. Login now