Show More
@@ -674,6 +674,113 b' rename information actually conflict wit' | |||||
674 | o 0 i-0 initial commit: a b h |
|
674 | o 0 i-0 initial commit: a b h | |
675 |
|
675 | |||
676 |
|
676 | |||
|
677 | Decision from previous merge are properly chained with later merge | |||
|
678 | ------------------------------------------------------------------ | |||
|
679 | ||||
|
680 | Subcase: chaining conflicting rename resolution | |||
|
681 | ``````````````````````````````````````````````` | |||
|
682 | ||||
|
683 | The "mAEm" and "mEAm" case create a rename tracking conflict on file 'f'. We | |||
|
684 | add more change on the respective branch and merge again. These second merge | |||
|
685 | does not involve the file 'f' and the arbitration done within "mAEm" and "mEA" | |||
|
686 | about that file should stay unchanged. | |||
|
687 | ||||
|
688 | $ case_desc="chained merges (conflict -> simple) - same content everywhere" | |||
|
689 | ||||
|
690 | (extra unrelated changes) | |||
|
691 | ||||
|
692 | $ hg up 'desc("a-2")' | |||
|
693 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
694 | $ echo j > unrelated-j | |||
|
695 | $ hg add unrelated-j | |||
|
696 | $ hg ci -m 'j-1: unrelated changes (based on the "a" series of changes)' | |||
|
697 | created new head | |||
|
698 | ||||
|
699 | $ hg up 'desc("e-2")' | |||
|
700 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !) | |||
|
701 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !) | |||
|
702 | $ echo k > unrelated-k | |||
|
703 | $ hg add unrelated-k | |||
|
704 | $ hg ci -m 'k-1: unrelated changes (based on "e" changes)' | |||
|
705 | created new head | |||
|
706 | ||||
|
707 | (merge variant 1) | |||
|
708 | ||||
|
709 | $ hg up 'desc("mAEm")' | |||
|
710 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !) | |||
|
711 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !) | |||
|
712 | $ hg merge 'desc("k-1")' | |||
|
713 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
714 | (branch merge, don't forget to commit) | |||
|
715 | $ hg ci -m "mAE,Km: $case_desc" | |||
|
716 | ||||
|
717 | (merge variant 2) | |||
|
718 | ||||
|
719 | $ hg up 'desc("k-1")' | |||
|
720 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) | |||
|
721 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) | |||
|
722 | ||||
|
723 | $ hg merge 'desc("mAEm")' | |||
|
724 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) | |||
|
725 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) | |||
|
726 | (branch merge, don't forget to commit) | |||
|
727 | $ hg ci -m "mK,AEm: $case_desc" | |||
|
728 | created new head | |||
|
729 | ||||
|
730 | (merge variant 3) | |||
|
731 | ||||
|
732 | $ hg up 'desc("mEAm")' | |||
|
733 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
734 | $ hg merge 'desc("j-1")' | |||
|
735 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
736 | (branch merge, don't forget to commit) | |||
|
737 | $ hg ci -m "mEA,Jm: $case_desc" | |||
|
738 | ||||
|
739 | (merge variant 4) | |||
|
740 | ||||
|
741 | $ hg up 'desc("j-1")' | |||
|
742 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) | |||
|
743 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) | |||
|
744 | $ hg merge 'desc("mEAm")' | |||
|
745 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) | |||
|
746 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) | |||
|
747 | (branch merge, don't forget to commit) | |||
|
748 | $ hg ci -m "mJ,EAm: $case_desc" | |||
|
749 | created new head | |||
|
750 | ||||
|
751 | ||||
|
752 | $ hg log -G --rev '::(desc("mAE,Km") + desc("mK,AEm") + desc("mEA,Jm") + desc("mJ,EAm"))' | |||
|
753 | @ 42 mJ,EAm: chained merges (conflict -> simple) - same content everywhere | |||
|
754 | |\ | |||
|
755 | +---o 41 mEA,Jm: chained merges (conflict -> simple) - same content everywhere | |||
|
756 | | |/ | |||
|
757 | | | o 40 mK,AEm: chained merges (conflict -> simple) - same content everywhere | |||
|
758 | | | |\ | |||
|
759 | | | +---o 39 mAE,Km: chained merges (conflict -> simple) - same content everywhere | |||
|
760 | | | | |/ | |||
|
761 | | | | o 38 k-1: unrelated changes (based on "e" changes) | |||
|
762 | | | | | | |||
|
763 | | o | | 37 j-1: unrelated changes (based on the "a" series of changes) | |||
|
764 | | | | | | |||
|
765 | o-----+ 20 mEAm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - the other way | |||
|
766 | |/ / / | |||
|
767 | | o / 19 mAEm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - one way | |||
|
768 | |/|/ | |||
|
769 | | o 10 e-2 g -move-> f | |||
|
770 | | | | |||
|
771 | | o 9 e-1 b -move-> g | |||
|
772 | | | | |||
|
773 | o | 4 a-2: e -move-> f | |||
|
774 | | | | |||
|
775 | o | 3 a-1: d -move-> e | |||
|
776 | |/ | |||
|
777 | o 2 i-2: c -move-> d | |||
|
778 | | | |||
|
779 | o 1 i-1: a -move-> c | |||
|
780 | | | |||
|
781 | o 0 i-0 initial commit: a b h | |||
|
782 | ||||
|
783 | ||||
677 |
|
784 | |||
678 | Summary of all created cases |
|
785 | Summary of all created cases | |
679 | ---------------------------- |
|
786 | ---------------------------- | |
@@ -698,7 +805,10 b' Summary of all created cases' | |||||
698 | i-0 initial commit: a b h |
|
805 | i-0 initial commit: a b h | |
699 | i-1: a -move-> c |
|
806 | i-1: a -move-> c | |
700 | i-2: c -move-> d |
|
807 | i-2: c -move-> d | |
|
808 | j-1: unrelated changes (based on the "a" series of changes) | |||
|
809 | k-1: unrelated changes (based on "e" changes) | |||
701 | mABm-0 simple merge - A side: multiple renames, B side: unrelated update - the other way |
|
810 | mABm-0 simple merge - A side: multiple renames, B side: unrelated update - the other way | |
|
811 | mAE,Km: chained merges (conflict -> simple) - same content everywhere | |||
702 | mAEm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - one way |
|
812 | mAEm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - one way | |
703 | mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way |
|
813 | mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way | |
704 | mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way |
|
814 | mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way | |
@@ -713,6 +823,7 b' Summary of all created cases' | |||||
713 | mCH-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - one way |
|
823 | mCH-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - one way | |
714 | mDBm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - the other way |
|
824 | mDBm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - the other way | |
715 | mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way |
|
825 | mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way | |
|
826 | mEA,Jm: chained merges (conflict -> simple) - same content everywhere | |||
716 | mEAm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - the other way |
|
827 | mEAm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - the other way | |
717 | mFBm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way |
|
828 | mFBm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way | |
718 | mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way |
|
829 | mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way | |
@@ -720,6 +831,8 b' Summary of all created cases' | |||||
720 | mGDm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - the other way |
|
831 | mGDm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - the other way | |
721 | mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way |
|
832 | mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way | |
722 | mHC-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - the other way |
|
833 | mHC-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - the other way | |
|
834 | mJ,EAm: chained merges (conflict -> simple) - same content everywhere | |||
|
835 | mK,AEm: chained merges (conflict -> simple) - same content everywhere | |||
723 |
|
836 | |||
724 |
|
837 | |||
725 | Test that sidedata computations during upgrades are correct |
|
838 | Test that sidedata computations during upgrades are correct | |
@@ -962,6 +1075,32 b' We upgrade a repository that is not usin' | |||||
962 | 1 sidedata entries |
|
1075 | 1 sidedata entries | |
963 | entry-0014 size 4 |
|
1076 | entry-0014 size 4 | |
964 | '\x00\x00\x00\x00' |
|
1077 | '\x00\x00\x00\x00' | |
|
1078 | ##### revision 37 ##### | |||
|
1079 | 1 sidedata entries | |||
|
1080 | entry-0014 size 24 | |||
|
1081 | '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-j' | |||
|
1082 | added : unrelated-j, ; | |||
|
1083 | ##### revision 38 ##### | |||
|
1084 | 1 sidedata entries | |||
|
1085 | entry-0014 size 24 | |||
|
1086 | '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-k' | |||
|
1087 | added : unrelated-k, ; | |||
|
1088 | ##### revision 39 ##### | |||
|
1089 | 1 sidedata entries | |||
|
1090 | entry-0014 size 4 | |||
|
1091 | '\x00\x00\x00\x00' | |||
|
1092 | ##### revision 40 ##### | |||
|
1093 | 1 sidedata entries | |||
|
1094 | entry-0014 size 4 | |||
|
1095 | '\x00\x00\x00\x00' | |||
|
1096 | ##### revision 41 ##### | |||
|
1097 | 1 sidedata entries | |||
|
1098 | entry-0014 size 4 | |||
|
1099 | '\x00\x00\x00\x00' | |||
|
1100 | ##### revision 42 ##### | |||
|
1101 | 1 sidedata entries | |||
|
1102 | entry-0014 size 4 | |||
|
1103 | '\x00\x00\x00\x00' | |||
965 |
|
1104 | |||
966 | #endif |
|
1105 | #endif | |
967 |
|
1106 | |||
@@ -1801,3 +1940,62 b' rename information actually conflict wit' | |||||
1801 | R a |
|
1940 | R a | |
1802 | $ hg status --copies --rev 'desc("h-1")' --rev 'desc("mHC-delete-before-conflict-m")' |
|
1941 | $ hg status --copies --rev 'desc("h-1")' --rev 'desc("mHC-delete-before-conflict-m")' | |
1803 | R a |
|
1942 | R a | |
|
1943 | ||||
|
1944 | Decision from previous merge are properly chained with later merge | |||
|
1945 | ------------------------------------------------------------------ | |||
|
1946 | ||||
|
1947 | ||||
|
1948 | Subcase: chaining conflicting rename resolution | |||
|
1949 | ``````````````````````````````````````````````` | |||
|
1950 | ||||
|
1951 | The "mAEm" and "mEAm" case create a rename tracking conflict on file 'f'. We | |||
|
1952 | add more change on the respective branch and merge again. These second merge | |||
|
1953 | does not involve the file 'f' and the arbitration done within "mAEm" and "mEA" | |||
|
1954 | about that file should stay unchanged. | |||
|
1955 | ||||
|
1956 | The result from mAEm is the same for the subsequent merge: | |||
|
1957 | ||||
|
1958 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAEm")' f | |||
|
1959 | A f | |||
|
1960 | a (filelog !) | |||
|
1961 | a (sidedata !) | |||
|
1962 | a (upgraded !) | |||
|
1963 | ||||
|
1964 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE,Km")' f | |||
|
1965 | A f | |||
|
1966 | a (filelog !) | |||
|
1967 | a (sidedata !) | |||
|
1968 | a (upgraded !) | |||
|
1969 | ||||
|
1970 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mK,AEm")' f | |||
|
1971 | A f | |||
|
1972 | a (filelog !) | |||
|
1973 | a (missing-correct-output sidedata !) | |||
|
1974 | a (missing-correct-output upgraded !) | |||
|
1975 | b (known-bad-output sidedata !) | |||
|
1976 | b (known-bad-output upgraded !) | |||
|
1977 | ||||
|
1978 | ||||
|
1979 | The result from mEAm is the same for the subsequent merge: | |||
|
1980 | ||||
|
1981 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEAm")' f | |||
|
1982 | A f | |||
|
1983 | a (filelog !) | |||
|
1984 | b (sidedata !) | |||
|
1985 | b (upgraded !) | |||
|
1986 | ||||
|
1987 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA,Jm")' f | |||
|
1988 | A f | |||
|
1989 | a (filelog !) | |||
|
1990 | b (sidedata !) | |||
|
1991 | b (upgraded !) | |||
|
1992 | ||||
|
1993 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mJ,EAm")' f | |||
|
1994 | A f | |||
|
1995 | a (filelog !) | |||
|
1996 | b (missing-correct-output sidedata !) | |||
|
1997 | b (missing-correct-output upgraded !) | |||
|
1998 | a (known-bad-output sidedata !) | |||
|
1999 | a (known-bad-output upgraded !) | |||
|
2000 | ||||
|
2001 |
General Comments 0
You need to be logged in to leave comments.
Login now