##// END OF EJS Templates
copies: make sure deleted copy info do not overwriting unrelated ones...
marmoute -
r46394:ff7e0ca6 default
parent child Browse files
Show More
@@ -400,7 +400,10 b' def _merge_copies_dict(minor, major, isa'
400 elif changes is not None and dest in changes.merged:
400 elif changes is not None and dest in changes.merged:
401 minor[dest] = value
401 minor[dest] = value
402 elif not isancestor(new_tt, other_tt):
402 elif not isancestor(new_tt, other_tt):
403 minor[dest] = value
403 if value[1] is not None:
404 minor[dest] = value
405 elif isancestor(other_tt, new_tt):
406 minor[dest] = value
404
407
405
408
406 def _revinfo_getter_extra(repo):
409 def _revinfo_getter_extra(repo):
@@ -585,6 +585,50 b' copy tracing chain.'
585
585
586 $ hg up null --quiet
586 $ hg up null --quiet
587
587
588 Merging a branch where a rename was deleted with a branch where the same file was renamed
589 ------------------------------------------------------------------------------------------
590
591 Create a "conflicting" merge where `d` get removed on one branch before its
592 rename information actually conflict with the other branch.
593
594 (the copy information from the branch that was not deleted should win).
595
596 $ hg up 'desc("i-0")'
597 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
598 $ hg mv b d
599 $ hg ci -m "h-1: b -(move)-> d"
600 created new head
601
602 $ hg up 'desc("c-1")'
603 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
604 $ hg merge 'desc("h-1")'
605 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
606 (branch merge, don't forget to commit)
607 $ hg ci -m "mCH-delete-before-conflict-m-0"
608
609 $ hg up 'desc("h-1")'
610 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
611 $ hg merge 'desc("c-1")'
612 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
613 (branch merge, don't forget to commit)
614 $ hg ci -m "mHC-delete-before-conflict-m-0"
615 created new head
616 $ hg log -G --rev '::(desc("mCH-delete-before-conflict-m")+desc("mHC-delete-before-conflict-m"))'
617 @ 36 mHC-delete-before-conflict-m-0
618 |\
619 +---o 35 mCH-delete-before-conflict-m-0
620 | |/
621 | o 34 h-1: b -(move)-> d
622 | |
623 o | 6 c-1 delete d
624 | |
625 o | 2 i-2: c -move-> d
626 | |
627 o | 1 i-1: a -move-> c
628 |/
629 o 0 i-0 initial commit: a b h
630
631
588
632
589 Test that sidedata computations during upgrades are correct
633 Test that sidedata computations during upgrades are correct
590 ===========================================================
634 ===========================================================
@@ -801,6 +845,20 b' We upgrade a repository that is not usin'
801 entry-0014 size 14
845 entry-0014 size 14
802 '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d'
846 '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d'
803 salvaged : d, ;
847 salvaged : d, ;
848 ##### revision 34 #####
849 1 sidedata entries
850 entry-0014 size 24
851 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00bd'
852 removed : b, ;
853 added p1: d, b;
854 ##### revision 35 #####
855 1 sidedata entries
856 entry-0014 size 4
857 '\x00\x00\x00\x00'
858 ##### revision 36 #####
859 1 sidedata entries
860 entry-0014 size 4
861 '\x00\x00\x00\x00'
804
862
805 #endif
863 #endif
806
864
@@ -1558,3 +1616,51 b' copy tracing chain.'
1558 A d
1616 A d
1559 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCB-revert-m-0")'
1617 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCB-revert-m-0")'
1560 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBC-revert-m-0")'
1618 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBC-revert-m-0")'
1619
1620
1621 Merging a branch where a rename was deleted with a branch where the same file was renamed
1622 ------------------------------------------------------------------------------------------
1623
1624 Create a "conflicting" merge where `d` get removed on one branch before its
1625 rename information actually conflict with the other branch.
1626
1627 (the copy information from the branch that was not deleted should win).
1628
1629 $ hg log -G --rev '::(desc("mCH-delete-before-conflict-m")+desc("mHC-delete-before-conflict-m"))'
1630 @ 36 mHC-delete-before-conflict-m-0
1631 |\
1632 +---o 35 mCH-delete-before-conflict-m-0
1633 | |/
1634 | o 34 h-1: b -(move)-> d
1635 | |
1636 o | 6 c-1 delete d
1637 | |
1638 o | 2 i-2: c -move-> d
1639 | |
1640 o | 1 i-1: a -move-> c
1641 |/
1642 o 0 i-0 initial commit: a b h
1643
1644
1645 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCH-delete-before-conflict-m")'
1646 A d
1647 b (no-compatibility no-changeset !)
1648 R a
1649 R b
1650 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mHC-delete-before-conflict-m")'
1651 A d
1652 b
1653 R a
1654 R b
1655 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCH-delete-before-conflict-m")'
1656 A d
1657 b
1658 R b
1659 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mHC-delete-before-conflict-m")'
1660 A d
1661 b
1662 R b
1663 $ hg status --copies --rev 'desc("h-1")' --rev 'desc("mCH-delete-before-conflict-m")'
1664 R a
1665 $ hg status --copies --rev 'desc("h-1")' --rev 'desc("mHC-delete-before-conflict-m")'
1666 R a
@@ -502,7 +502,7 b' Try merging the other direction too'
502 $ hg debugpathcopies 2 4
502 $ hg debugpathcopies 2 4
503 x -> z (no-filelog !)
503 x -> z (no-filelog !)
504 $ hg debugpathcopies 0 4
504 $ hg debugpathcopies 0 4
505 x -> z (filelog !)
505 x -> z (no-changeset no-compatibility !)
506 $ hg debugpathcopies 1 5
506 $ hg debugpathcopies 1 5
507 $ hg debugpathcopies 2 5
507 $ hg debugpathcopies 2 5
508 x -> z (no-filelog !)
508 x -> z (no-filelog !)
General Comments 0
You need to be logged in to leave comments. Login now