Show More
@@ -611,6 +611,7 b' def _checkcopies(ctx, f, m1, m2, base, t' | |||||
611 | """ |
|
611 | """ | |
612 |
|
612 | |||
613 | mb = base.manifest() |
|
613 | mb = base.manifest() | |
|
614 | mta = tca.manifest() | |||
614 | # Might be true if this call is about finding backward renames, |
|
615 | # Might be true if this call is about finding backward renames, | |
615 | # This happens in the case of grafts because the DAG is then rotated. |
|
616 | # This happens in the case of grafts because the DAG is then rotated. | |
616 | # If the file exists in both the base and the source, we are not looking |
|
617 | # If the file exists in both the base and the source, we are not looking | |
@@ -665,8 +666,17 b' def _checkcopies(ctx, f, m1, m2, base, t' | |||||
665 | break |
|
666 | break | |
666 | return |
|
667 | return | |
667 |
|
668 | |||
668 |
if of in m |
|
669 | if of in mta: | |
669 | data['diverge'].setdefault(of, []).append(f) |
|
670 | if backwards or remotebase: | |
|
671 | data['incomplete'][of] = f | |||
|
672 | else: | |||
|
673 | for sf in seen: | |||
|
674 | if sf in mb: | |||
|
675 | if tca == base: | |||
|
676 | data['diverge'].setdefault(sf, []).append(f) | |||
|
677 | else: | |||
|
678 | data['incompletediverge'][sf] = [of, f] | |||
|
679 | return | |||
670 |
|
680 | |||
671 | def duplicatecopies(repo, rev, fromrev, skiprev=None): |
|
681 | def duplicatecopies(repo, rev, fromrev, skiprev=None): | |
672 | '''reproduce copies from fromrev to rev in the dirstate |
|
682 | '''reproduce copies from fromrev to rev in the dirstate |
@@ -957,15 +957,6 b' two renames actually converge to the sam' | |||||
957 | grafting 2:f58c7e2b28fa "C0" |
|
957 | grafting 2:f58c7e2b28fa "C0" | |
958 | merging f1a and f1b to f1a |
|
958 | merging f1a and f1b to f1a | |
959 | merging f5a |
|
959 | merging f5a | |
960 | warning: conflicts while merging f5a! (edit, then use 'hg resolve --mark') |
|
|||
961 | abort: unresolved conflicts, can't continue |
|
|||
962 | (use 'hg resolve' and 'hg graft --continue') |
|
|||
963 | [255] |
|
|||
964 | $ hg resolve f5a -t ':other' # XXX work around failure |
|
|||
965 | (no more unresolved files) |
|
|||
966 | continue: hg graft --continue |
|
|||
967 | $ hg graft --continue # XXX work around failure |
|
|||
968 | grafting 2:f58c7e2b28fa "C0" |
|
|||
969 |
warning: |
|
960 | warning: can't find ancestor for 'f5a' copied from 'f5b'! | |
970 | $ hg status --change . |
|
961 | $ hg status --change . | |
971 | M f1a |
|
962 | M f1a | |
@@ -975,7 +966,7 b' two renames actually converge to the sam' | |||||
975 | $ hg cat f1a |
|
966 | $ hg cat f1a | |
976 | c1c |
|
967 | c1c | |
977 | $ hg cat f1b |
|
968 | $ hg cat f1b | |
978 |
f1b: no such file in rev |
|
969 | f1b: no such file in rev c9763722f9bd | |
979 | [1] |
|
970 | [1] | |
980 |
|
971 | |||
981 | Test the cases A.0 (f4x) and A.6 (f3x) |
|
972 | Test the cases A.0 (f4x) and A.6 (f3x) | |
@@ -997,23 +988,23 b' Set up the repository for some further t' | |||||
997 | $ hg mv f5a f5b |
|
988 | $ hg mv f5a f5b | |
998 | $ hg ci -qAm "E0" |
|
989 | $ hg ci -qAm "E0" | |
999 | $ hg log -G |
|
990 | $ hg log -G | |
1000 |
@ changeset: 6: |
|
991 | @ changeset: 6:6bd1736cab86 | |
1001 | | tag: tip |
|
992 | | tag: tip | |
1002 | | parent: 0:11f7a1b56675 |
|
993 | | parent: 0:11f7a1b56675 | |
1003 | | user: test |
|
994 | | user: test | |
1004 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
995 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1005 | | summary: E0 |
|
996 | | summary: E0 | |
1006 | | |
|
997 | | | |
1007 |
| o changeset: 5: |
|
998 | | o changeset: 5:560daee679da | |
1008 | | | user: test |
|
999 | | | user: test | |
1009 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1000 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1010 | | | summary: D1 |
|
1001 | | | summary: D1 | |
1011 | | | |
|
1002 | | | | |
1012 |
| o changeset: 4: |
|
1003 | | o changeset: 4:c9763722f9bd | |
1013 | |/ parent: 0:11f7a1b56675 |
|
1004 | |/ parent: 0:11f7a1b56675 | |
1014 | | user: test |
|
1005 | | user: test | |
1015 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1006 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1016 |
| summary: C |
|
1007 | | summary: C1 | |
1017 | | |
|
1008 | | | |
1018 | | o changeset: 3:b69f5839d2d9 |
|
1009 | | o changeset: 3:b69f5839d2d9 | |
1019 | | | user: test |
|
1010 | | | user: test | |
@@ -1041,34 +1032,24 b' and A.3 with a local content change to b' | |||||
1041 |
|
1032 | |||
1042 |
$ HGEDITOR=" |
|
1033 | $ HGEDITOR="echo C2 >" hg graft -r 'desc("C0")' --edit | |
1043 | grafting 2:f58c7e2b28fa "C0" |
|
1034 | grafting 2:f58c7e2b28fa "C0" | |
1044 | other [graft] changed f1b which local [local] deleted |
|
1035 | merging f1e and f1b to f1e | |
1045 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
|
|||
1046 | merging f2a and f2c to f2c |
|
1036 | merging f2a and f2c to f2c | |
1047 | merging f5b and f5a to f5a |
|
1037 | merging f5b and f5a to f5a | |
1048 | abort: unresolved conflicts, can't continue |
|
|||
1049 | (use 'hg resolve' and 'hg graft --continue') |
|
|||
1050 | [255] |
|
|||
1051 | $ hg resolve f1b -t ':other' # XXX work around failure |
|
|||
1052 | (no more unresolved files) |
|
|||
1053 | continue: hg graft --continue |
|
|||
1054 | $ hg graft --continue # XXX work around failure |
|
|||
1055 | grafting 2:f58c7e2b28fa "C0" |
|
|||
1056 | grafting 4:43e4b415492d "C0" |
|
|||
1057 | merging f1e and f1a to f1e |
|
|||
1058 | merging f2c |
|
|||
1059 | warning: can't find ancestor for 'f2c' copied from 'f2a'! |
|
|||
1060 |
|
1038 | |||
1061 | Test the cases A.1 (f4x) and A.7 (f3x). |
|
1039 | Test the cases A.1 (f4x) and A.7 (f3x). | |
1062 |
|
1040 | |||
1063 |
$ HGEDITOR=" |
|
1041 | $ HGEDITOR="echo D2 >" hg graft -r 'desc("D0")' --edit | |
1064 | grafting 3:b69f5839d2d9 "D0" |
|
1042 | grafting 3:b69f5839d2d9 "D0" | |
|
1043 | note: possible conflict - f3b was renamed multiple times to: | |||
|
1044 | f3e | |||
|
1045 | f3d | |||
1065 | merging f4e and f4a to f4e |
|
1046 | merging f4e and f4a to f4e | |
1066 |
warning: |
|
1047 | warning: can't find ancestor for 'f3d' copied from 'f3b'! | |
1067 |
|
1048 | |||
1068 | Check the results of the grafts tested |
|
1049 | Check the results of the grafts tested | |
1069 |
|
1050 | |||
1070 | $ hg log -CGv --patch --git |
|
1051 | $ hg log -CGv --patch --git | |
1071 |
@ changeset: |
|
1052 | @ changeset: 8:93ee502e8b0a | |
1072 | | tag: tip |
|
1053 | | tag: tip | |
1073 | | user: test |
|
1054 | | user: test | |
1074 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1055 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
@@ -1090,12 +1071,13 b' Check the results of the grafts tested' | |||||
1090 | | -c4a |
|
1071 | | -c4a | |
1091 | | +c4d |
|
1072 | | +c4d | |
1092 | | |
|
1073 | | | |
1093 |
o changeset: |
|
1074 | o changeset: 7:539cf145f496 | |
1094 | | user: test |
|
1075 | | user: test | |
1095 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1076 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1096 |
| files: f1e f |
|
1077 | | files: f1e f2a f2c f5a f5b | |
|
1078 | | copies: f2c (f2a) f5a (f5b) | |||
1097 | | description: |
|
1079 | | description: | |
1098 |
| C |
|
1080 | | C2 | |
1099 | | |
|
1081 | | | |
1100 | | |
|
1082 | | | |
1101 | | diff --git a/f1e b/f1e |
|
1083 | | diff --git a/f1e b/f1e | |
@@ -1104,32 +1086,6 b' Check the results of the grafts tested' | |||||
1104 | | @@ -1,1 +1,1 @@ |
|
1086 | | @@ -1,1 +1,1 @@ | |
1105 | | -c1a |
|
1087 | | -c1a | |
1106 | | +c1c |
|
1088 | | +c1c | |
1107 | | diff --git a/f5a.orig b/f5a.orig |
|
|||
1108 | | deleted file mode 100644 |
|
|||
1109 | | --- a/f5a.orig |
|
|||
1110 | | +++ /dev/null |
|
|||
1111 | | @@ -1,5 +0,0 @@ |
|
|||
1112 | | -<<<<<<< local: 11f7a1b56675 - test: A0 |
|
|||
1113 | | -c5a |
|
|||
1114 | | -======= |
|
|||
1115 | | -c5c |
|
|||
1116 | | ->>>>>>> graft: f58c7e2b28fa - test: C0 |
|
|||
1117 | | |
|
|||
1118 | o changeset: 7:dc778749ee9a |
|
|||
1119 | | user: test |
|
|||
1120 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
|||
1121 | | files: f1b f2a f2c f5a f5b |
|
|||
1122 | | copies: f2c (f2a) f5a (f5b) |
|
|||
1123 | | description: |
|
|||
1124 | | C0 |
|
|||
1125 | | |
|
|||
1126 | | |
|
|||
1127 | | diff --git a/f1b b/f1b |
|
|||
1128 | | new file mode 100644 |
|
|||
1129 | | --- /dev/null |
|
|||
1130 | | +++ b/f1b |
|
|||
1131 | | @@ -0,0 +1,1 @@ |
|
|||
1132 | | +c1c |
|
|||
1133 | | diff --git a/f2a b/f2c |
|
1089 | | diff --git a/f2a b/f2c | |
1134 | | rename from f2a |
|
1090 | | rename from f2a | |
1135 | | rename to f2c |
|
1091 | | rename to f2c | |
@@ -1142,11 +1098,11 b' Check the results of the grafts tested' | |||||
1142 | | -c5a |
|
1098 | | -c5a | |
1143 | | +c5c |
|
1099 | | +c5c | |
1144 | | |
|
1100 | | | |
1145 |
o changeset: 6: |
|
1101 | o changeset: 6:6bd1736cab86 | |
1146 | | parent: 0:11f7a1b56675 |
|
1102 | | parent: 0:11f7a1b56675 | |
1147 | | user: test |
|
1103 | | user: test | |
1148 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1104 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1149 |
| files: f1a f1e f2a f3a f3e f4a f4e f5a f5 |
|
1105 | | files: f1a f1e f2a f3a f3e f4a f4e f5a f5b | |
1150 | | copies: f1e (f1a) f3e (f3a) f4e (f4a) f5b (f5a) |
|
1106 | | copies: f1e (f1a) f3e (f3a) f4e (f4a) f5b (f5a) | |
1151 | | description: |
|
1107 | | description: | |
1152 | | E0 |
|
1108 | | E0 | |
@@ -1167,21 +1123,11 b' Check the results of the grafts tested' | |||||
1167 | | diff --git a/f4a b/f4e |
|
1123 | | diff --git a/f4a b/f4e | |
1168 | | rename from f4a |
|
1124 | | rename from f4a | |
1169 | | rename to f4e |
|
1125 | | rename to f4e | |
1170 | | diff --git a/f5a.orig b/f5a.orig |
|
|||
1171 | | new file mode 100644 |
|
|||
1172 | | --- /dev/null |
|
|||
1173 | | +++ b/f5a.orig |
|
|||
1174 | | @@ -0,0 +1,5 @@ |
|
|||
1175 | | +<<<<<<< local: 11f7a1b56675 - test: A0 |
|
|||
1176 | | +c5a |
|
|||
1177 | | +======= |
|
|||
1178 | | +c5c |
|
|||
1179 | | +>>>>>>> graft: f58c7e2b28fa - test: C0 |
|
|||
1180 | | diff --git a/f5a b/f5b |
|
1126 | | diff --git a/f5a b/f5b | |
1181 | | rename from f5a |
|
1127 | | rename from f5a | |
1182 | | rename to f5b |
|
1128 | | rename to f5b | |
1183 | | |
|
1129 | | | |
1184 |
| o changeset: 5: |
|
1130 | | o changeset: 5:560daee679da | |
1185 | | | user: test |
|
1131 | | | user: test | |
1186 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1132 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1187 | | | files: f3d f4a |
|
1133 | | | files: f3d f4a | |
@@ -1202,14 +1148,14 b' Check the results of the grafts tested' | |||||
1202 | | | -c4a |
|
1148 | | | -c4a | |
1203 | | | +c4d |
|
1149 | | | +c4d | |
1204 | | | |
|
1150 | | | | |
1205 |
| o changeset: 4: |
|
1151 | | o changeset: 4:c9763722f9bd | |
1206 | |/ parent: 0:11f7a1b56675 |
|
1152 | |/ parent: 0:11f7a1b56675 | |
1207 | | user: test |
|
1153 | | user: test | |
1208 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1154 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1209 | | files: f1a f2a f2c f5a |
|
1155 | | files: f1a f2a f2c f5a | |
1210 | | copies: f2c (f2a) |
|
1156 | | copies: f2c (f2a) | |
1211 | | description: |
|
1157 | | description: | |
1212 |
| C |
|
1158 | | C1 | |
1213 | | |
|
1159 | | | |
1214 | | |
|
1160 | | | |
1215 | | diff --git a/f1a b/f1a |
|
1161 | | diff --git a/f1a b/f1a |
General Comments 0
You need to be logged in to leave comments.
Login now