Show More
@@ -251,10 +251,10 b' def _computenonoverlap(repo, c1, c2, add' | |||||
251 | return u1, u2 |
|
251 | return u1, u2 | |
252 |
|
252 | |||
253 | def _makegetfctx(ctx): |
|
253 | def _makegetfctx(ctx): | |
254 | """return a 'getfctx' function suitable for checkcopies usage |
|
254 | """return a 'getfctx' function suitable for _checkcopies usage | |
255 |
|
255 | |||
256 | We have to re-setup the function building 'filectx' for each |
|
256 | We have to re-setup the function building 'filectx' for each | |
257 | 'checkcopies' to ensure the linkrev adjustment is properly setup for |
|
257 | '_checkcopies' to ensure the linkrev adjustment is properly setup for | |
258 | each. Linkrev adjustment is important to avoid bug in rename |
|
258 | each. Linkrev adjustment is important to avoid bug in rename | |
259 | detection. Moreover, having a proper '_ancestrycontext' setup ensures |
|
259 | detection. Moreover, having a proper '_ancestrycontext' setup ensures | |
260 | the performance impact of this adjustment is kept limited. Without it, |
|
260 | the performance impact of this adjustment is kept limited. Without it, | |
@@ -331,7 +331,7 b' def mergecopies(repo, c1, c2, ca):' | |||||
331 | m2 = c2.manifest() |
|
331 | m2 = c2.manifest() | |
332 | ma = ca.manifest() |
|
332 | ma = ca.manifest() | |
333 |
|
333 | |||
334 | # see checkcopies documentation below for these dicts |
|
334 | # see _checkcopies documentation below for these dicts | |
335 | copy1, copy2 = {}, {} |
|
335 | copy1, copy2 = {}, {} | |
336 | movewithdir1, movewithdir2 = {}, {} |
|
336 | movewithdir1, movewithdir2 = {}, {} | |
337 | fullcopy1, fullcopy2 = {}, {} |
|
337 | fullcopy1, fullcopy2 = {}, {} | |
@@ -345,10 +345,10 b' def mergecopies(repo, c1, c2, ca):' | |||||
345 | bothnew = sorted(addedinm1 & addedinm2) |
|
345 | bothnew = sorted(addedinm1 & addedinm2) | |
346 |
|
346 | |||
347 | for f in u1u: |
|
347 | for f in u1u: | |
348 | checkcopies(c1, f, m1, m2, ca, limit, diverge, copy1, fullcopy1) |
|
348 | _checkcopies(c1, f, m1, m2, ca, limit, diverge, copy1, fullcopy1) | |
349 |
|
349 | |||
350 | for f in u2u: |
|
350 | for f in u2u: | |
351 | checkcopies(c2, f, m2, m1, ca, limit, diverge, copy2, fullcopy2) |
|
351 | _checkcopies(c2, f, m2, m1, ca, limit, diverge, copy2, fullcopy2) | |
352 |
|
352 | |||
353 | copy = dict(copy1.items() + copy2.items()) |
|
353 | copy = dict(copy1.items() + copy2.items()) | |
354 | movewithdir = dict(movewithdir1.items() + movewithdir2.items()) |
|
354 | movewithdir = dict(movewithdir1.items() + movewithdir2.items()) | |
@@ -373,8 +373,8 b' def mergecopies(repo, c1, c2, ca):' | |||||
373 | % "\n ".join(bothnew)) |
|
373 | % "\n ".join(bothnew)) | |
374 | bothdiverge, _copy, _fullcopy = {}, {}, {} |
|
374 | bothdiverge, _copy, _fullcopy = {}, {}, {} | |
375 | for f in bothnew: |
|
375 | for f in bothnew: | |
376 | checkcopies(c1, f, m1, m2, ca, limit, bothdiverge, _copy, _fullcopy) |
|
376 | _checkcopies(c1, f, m1, m2, ca, limit, bothdiverge, _copy, _fullcopy) | |
377 | checkcopies(c2, f, m2, m1, ca, limit, bothdiverge, _copy, _fullcopy) |
|
377 | _checkcopies(c2, f, m2, m1, ca, limit, bothdiverge, _copy, _fullcopy) | |
378 | for of, fl in bothdiverge.items(): |
|
378 | for of, fl in bothdiverge.items(): | |
379 | if len(fl) == 2 and fl[0] == fl[1]: |
|
379 | if len(fl) == 2 and fl[0] == fl[1]: | |
380 | copy[fl[0]] = of # not actually divergent, just matching renames |
|
380 | copy[fl[0]] = of # not actually divergent, just matching renames | |
@@ -454,7 +454,7 b' def mergecopies(repo, c1, c2, ca):' | |||||
454 |
|
454 | |||
455 | return copy, movewithdir, diverge, renamedelete |
|
455 | return copy, movewithdir, diverge, renamedelete | |
456 |
|
456 | |||
457 | def checkcopies(ctx, f, m1, m2, ca, limit, diverge, copy, fullcopy): |
|
457 | def _checkcopies(ctx, f, m1, m2, ca, limit, diverge, copy, fullcopy): | |
458 | """ |
|
458 | """ | |
459 | check possible copies of f from m1 to m2 |
|
459 | check possible copies of f from m1 to m2 | |
460 |
|
460 |
General Comments 0
You need to be logged in to leave comments.
Login now