##// END OF EJS Templates
merge: add a bit more sanity to divergent copy checks
Matt Mackall -
r5857:c704b038 default
parent child Browse files
Show More
@@ -210,21 +210,23 b' def findcopies(repo, m1, m2, ma, limit):'
210 for f in u2:
210 for f in u2:
211 checkcopies(ctx(f, m2[f]), m1, ma)
211 checkcopies(ctx(f, m2[f]), m1, ma)
212
212
213 d2 = {}
213 diverge2 = {}
214 for of, fl in diverge.items():
214 for of, fl in diverge.items():
215 for f in fl:
215 if len(fl) == 1:
216 fo = list(fl)
216 del diverge[of] # not actually divergent
217 fo.remove(f)
217 else:
218 d2[f] = (of, fo)
218 diverge2.update(dict.fromkeys(fl)) # reverse map for below
219
219
220 if fullcopy:
220 if fullcopy:
221 repo.ui.debug(_(" all copies found (* = to merge, ! = divergent):\n"))
221 repo.ui.debug(_(" all copies found (* = to merge, ! = divergent):\n"))
222 for f in fullcopy:
222 for f in fullcopy:
223 note = ""
223 note = ""
224 if f in copy: note += "*"
224 if f in copy: note += "*"
225 if f in diverge: note += "!"
225 if f in diverge2: note += "!"
226 repo.ui.debug(_(" %s -> %s %s\n") % (f, fullcopy[f], note))
226 repo.ui.debug(_(" %s -> %s %s\n") % (f, fullcopy[f], note))
227
227
228 del diverge2
229
228 if not fullcopy or not repo.ui.configbool("merge", "followdirs", True):
230 if not fullcopy or not repo.ui.configbool("merge", "followdirs", True):
229 return copy, diverge
231 return copy, diverge
230
232
@@ -11,9 +11,9 b' resolving manifests'
11 b
11 b
12 b2
12 b2
13 all copies found (* = to merge, ! = divergent):
13 all copies found (* = to merge, ! = divergent):
14 c2 -> a2
14 c2 -> a2 !
15 b -> a *
15 b -> a *
16 b2 -> a2
16 b2 -> a2 !
17 checking for directory renames
17 checking for directory renames
18 a2: divergent renames -> dr
18 a2: divergent renames -> dr
19 a: remote moved to b -> m
19 a: remote moved to b -> m
@@ -228,8 +228,8 b' resolving manifests'
228 unmatched files in other:
228 unmatched files in other:
229 c
229 c
230 all copies found (* = to merge, ! = divergent):
230 all copies found (* = to merge, ! = divergent):
231 c -> a
231 c -> a !
232 b -> a
232 b -> a !
233 checking for directory renames
233 checking for directory renames
234 a: divergent renames -> dr
234 a: divergent renames -> dr
235 rev: versions differ -> m
235 rev: versions differ -> m
General Comments 0
You need to be logged in to leave comments. Login now