##// END OF EJS Templates
mergecopies: invoke _computenonoverlap for both base and tca during merges...
Gábor Stefanik -
r30197:0accd5a5 default
parent child Browse files
Show More
@@ -373,9 +373,21 def mergecopies(repo, c1, c2, base):
373 373 # find interesting file sets from manifests
374 374 addedinm1 = m1.filesnotin(mb)
375 375 addedinm2 = m2.filesnotin(mb)
376 bothnew = sorted(addedinm1 & addedinm2)
377 if tca == base:
378 # unmatched file from base
376 379 u1r, u2r = _computenonoverlap(repo, c1, c2, addedinm1, addedinm2)
377 380 u1u, u2u = u1r, u2r
378 bothnew = sorted(addedinm1 & addedinm2)
381 else:
382 # unmatched file from base (DAG rotation in the graft case)
383 u1r, u2r = _computenonoverlap(repo, c1, c2, addedinm1, addedinm2,
384 baselabel='base')
385 # unmatched file from topological common ancestors (no DAG rotation)
386 # need to recompute this for directory move handling when grafting
387 mta = tca.manifest()
388 u1u, u2u = _computenonoverlap(repo, c1, c2, m1.filesnotin(mta),
389 m2.filesnotin(mta),
390 baselabel='topological common ancestor')
379 391
380 392 for f in u1u:
381 393 _checkcopies(c1, f, m1, m2, base, tca, limit, data1)
@@ -179,6 +179,11 Graft out of order, skipping a merge and
179 179 committing changelog
180 180 grafting 5:97f8bfe72746 "5"
181 181 searching for copies back to rev 1
182 unmatched files in other (from topological common ancestor):
183 c
184 all copies found (* = to merge, ! = divergent, % = renamed and deleted):
185 src: 'c' -> dst: 'b' *
186 checking for directory renames
182 187 resolving manifests
183 188 branchmerge: True, force: True, partial: False
184 189 ancestor: 4c60f11aa304, local: 6b9e5368ca4e+, remote: 97f8bfe72746
@@ -193,6 +198,11 Graft out of order, skipping a merge and
193 198 scanning for duplicate grafts
194 199 grafting 4:9c233e8e184d "4"
195 200 searching for copies back to rev 1
201 unmatched files in other (from topological common ancestor):
202 c
203 all copies found (* = to merge, ! = divergent, % = renamed and deleted):
204 src: 'c' -> dst: 'b' *
205 checking for directory renames
196 206 resolving manifests
197 207 branchmerge: True, force: True, partial: False
198 208 ancestor: 4c60f11aa304, local: 1905859650ec+, remote: 9c233e8e184d
@@ -945,6 +955,7 two renames actually converge to the sam
945 955 $ hg up -q 'desc("A0")'
946 956 $ HGEDITOR="echo C1 >" hg graft -r 'desc("C0")' --edit
947 957 grafting 2:f58c7e2b28fa "C0"
958 merging f1a and f1b to f1a
948 959 merging f5a
949 960 warning: conflicts while merging f5a! (edit, then use 'hg resolve --mark')
950 961 abort: unresolved conflicts, can't continue
@@ -957,14 +968,15 two renames actually converge to the sam
957 968 grafting 2:f58c7e2b28fa "C0"
958 969 warning: can't find ancestor for 'f5a' copied from 'f5b'!
959 970 $ hg status --change .
971 M f1a
960 972 M f5a
961 A f1b
962 973 A f2c
963 974 R f2a
964 975 $ hg cat f1a
965 c1a
976 c1c
966 977 $ hg cat f1b
967 c1c
978 f1b: no such file in rev 43e4b415492d
979 [1]
968 980
969 981 Test the cases A.0 (f4x) and A.6 (f3x)
970 982
@@ -989,12 +1001,12 Set up the repository for some further t
989 1001 | date: Thu Jan 01 00:00:00 1970 +0000
990 1002 | summary: E0
991 1003 |
992 | o changeset: 5:573bb6b4b56d
1004 | o changeset: 5:4f4ba7a6e606
993 1005 | | user: test
994 1006 | | date: Thu Jan 01 00:00:00 1970 +0000
995 1007 | | summary: D1
996 1008 | |
997 | o changeset: 4:af23416e619b
1009 | o changeset: 4:43e4b415492d
998 1010 |/ parent: 0:11f7a1b56675
999 1011 | user: test
1000 1012 | date: Thu Jan 01 00:00:00 1970 +0000
@@ -1029,6 +1041,7 and A.3 with a local content change to b
1029 1041 other [graft] changed f1b which local [local] deleted
1030 1042 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u
1031 1043 merging f2a and f2c to f2c
1044 merging f5b and f5a to f5a
1032 1045 abort: unresolved conflicts, can't continue
1033 1046 (use 'hg resolve' and 'hg graft --continue')
1034 1047 [255]
@@ -1037,7 +1050,8 and A.3 with a local content change to b
1037 1050 continue: hg graft --continue
1038 1051 $ hg graft --continue # XXX work around failure
1039 1052 grafting 2:f58c7e2b28fa "C0"
1040 grafting 4:af23416e619b "C0"
1053 grafting 4:43e4b415492d "C0"
1054 merging f1e and f1a to f1e
1041 1055 merging f2c
1042 1056 warning: can't find ancestor for 'f2c' copied from 'f2a'!
1043 1057
@@ -1051,7 +1065,7 Test the cases A.1 (f4x) and A.7 (f3x).
1051 1065 Check the results of the grafts tested
1052 1066
1053 1067 $ hg log -CGv --patch --git
1054 @ changeset: 9:6d76b84e6e84
1068 @ changeset: 9:100f4d78e056
1055 1069 | tag: tip
1056 1070 | user: test
1057 1071 | date: Thu Jan 01 00:00:00 1970 +0000
@@ -1073,13 +1087,30 Check the results of the grafts tested
1073 1087 | -c4a
1074 1088 | +c4d
1075 1089 |
1076 o changeset: 8:3079ba7d03f0
1090 o changeset: 8:84915a7da133
1077 1091 | user: test
1078 1092 | date: Thu Jan 01 00:00:00 1970 +0000
1093 | files: f1e f5a.orig
1079 1094 | description:
1080 1095 | C0
1081 1096 |
1082 1097 |
1098 | diff --git a/f1e b/f1e
1099 | --- a/f1e
1100 | +++ b/f1e
1101 | @@ -1,1 +1,1 @@
1102 | -c1a
1103 | +c1c
1104 | diff --git a/f5a.orig b/f5a.orig
1105 | deleted file mode 100644
1106 | --- a/f5a.orig
1107 | +++ /dev/null
1108 | @@ -1,5 +0,0 @@
1109 | -<<<<<<< local: 11f7a1b56675 - test: A0
1110 | -c5a
1111 | -=======
1112 | -c5c
1113 | ->>>>>>> graft: f58c7e2b28fa - test: C0
1083 1114 |
1084 1115 o changeset: 7:dc778749ee9a
1085 1116 | user: test
@@ -1147,7 +1178,7 Check the results of the grafts tested
1147 1178 | rename from f5a
1148 1179 | rename to f5b
1149 1180 |
1150 | o changeset: 5:573bb6b4b56d
1181 | o changeset: 5:4f4ba7a6e606
1151 1182 | | user: test
1152 1183 | | date: Thu Jan 01 00:00:00 1970 +0000
1153 1184 | | files: f3d f4a
@@ -1168,21 +1199,21 Check the results of the grafts tested
1168 1199 | | -c4a
1169 1200 | | +c4d
1170 1201 | |
1171 | o changeset: 4:af23416e619b
1202 | o changeset: 4:43e4b415492d
1172 1203 |/ parent: 0:11f7a1b56675
1173 1204 | user: test
1174 1205 | date: Thu Jan 01 00:00:00 1970 +0000
1175 | files: f1b f2a f2c f5a
1206 | files: f1a f2a f2c f5a
1176 1207 | copies: f2c (f2a)
1177 1208 | description:
1178 1209 | C0
1179 1210 |
1180 1211 |
1181 | diff --git a/f1b b/f1b
1182 | new file mode 100644
1183 | --- /dev/null
1184 | +++ b/f1b
1185 | @@ -0,0 +1,1 @@
1212 | diff --git a/f1a b/f1a
1213 | --- a/f1a
1214 | +++ b/f1a
1215 | @@ -1,1 +1,1 @@
1216 | -c1a
1186 1217 | +c1c
1187 1218 | diff --git a/f2a b/f2c
1188 1219 | rename from f2a
@@ -238,6 +238,8 Check that the right ancestors is used w
238 238 merge against 9:e31216eec445
239 239 detach base 8:8e4e2c1a07ae
240 240 searching for copies back to rev 3
241 unmatched files in other (from topological common ancestor):
242 f2.txt
241 243 resolving manifests
242 244 branchmerge: True, force: True, partial: False
243 245 ancestor: 8e4e2c1a07ae, local: 4bc80088dc6b+, remote: e31216eec445
@@ -255,6 +257,8 Check that the right ancestors is used w
255 257 merge against 10:2f2496ddf49d
256 258 detach base 9:e31216eec445
257 259 searching for copies back to rev 3
260 unmatched files in other (from topological common ancestor):
261 f2.txt
258 262 resolving manifests
259 263 branchmerge: True, force: True, partial: False
260 264 ancestor: e31216eec445, local: 19c888675e13+, remote: 2f2496ddf49d
General Comments 0
You need to be logged in to leave comments. Login now