##// END OF EJS Templates
copies: mark checkcopies as internal with the _ prefix
Gábor Stefanik -
r30048:91a3c58e default
parent child Browse files
Show More
@@ -251,10 +251,10 b' def _computenonoverlap(repo, c1, c2, add'
251 251 return u1, u2
252 252
253 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 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 258 each. Linkrev adjustment is important to avoid bug in rename
259 259 detection. Moreover, having a proper '_ancestrycontext' setup ensures
260 260 the performance impact of this adjustment is kept limited. Without it,
@@ -331,7 +331,7 b' def mergecopies(repo, c1, c2, ca):'
331 331 m2 = c2.manifest()
332 332 ma = ca.manifest()
333 333
334 # see checkcopies documentation below for these dicts
334 # see _checkcopies documentation below for these dicts
335 335 copy1, copy2 = {}, {}
336 336 movewithdir1, movewithdir2 = {}, {}
337 337 fullcopy1, fullcopy2 = {}, {}
@@ -345,10 +345,10 b' def mergecopies(repo, c1, c2, ca):'
345 345 bothnew = sorted(addedinm1 & addedinm2)
346 346
347 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 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 353 copy = dict(copy1.items() + copy2.items())
354 354 movewithdir = dict(movewithdir1.items() + movewithdir2.items())
@@ -373,8 +373,8 b' def mergecopies(repo, c1, c2, ca):'
373 373 % "\n ".join(bothnew))
374 374 bothdiverge, _copy, _fullcopy = {}, {}, {}
375 375 for f in bothnew:
376 checkcopies(c1, f, m1, m2, ca, limit, bothdiverge, _copy, _fullcopy)
377 checkcopies(c2, f, m2, m1, 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)
378 378 for of, fl in bothdiverge.items():
379 379 if len(fl) == 2 and fl[0] == fl[1]:
380 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 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 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