Skip to content
Snippets Groups Projects
Commit 91a3c58ecf93 authored by Gábor Stefanik's avatar Gábor Stefanik
Browse files

copies: mark checkcopies as internal with the _ prefix

parent d13a7c8bf0a5
Branches
Tags
No related merge requests found
......@@ -251,6 +251,6 @@
return u1, u2
def _makegetfctx(ctx):
"""return a 'getfctx' function suitable for checkcopies usage
"""return a 'getfctx' function suitable for _checkcopies usage
We have to re-setup the function building 'filectx' for each
......@@ -255,6 +255,6 @@
We have to re-setup the function building 'filectx' for each
'checkcopies' to ensure the linkrev adjustment is properly setup for
'_checkcopies' to ensure the linkrev adjustment is properly setup for
each. Linkrev adjustment is important to avoid bug in rename
detection. Moreover, having a proper '_ancestrycontext' setup ensures
the performance impact of this adjustment is kept limited. Without it,
......@@ -331,7 +331,7 @@
m2 = c2.manifest()
ma = ca.manifest()
# see checkcopies documentation below for these dicts
# see _checkcopies documentation below for these dicts
copy1, copy2 = {}, {}
movewithdir1, movewithdir2 = {}, {}
fullcopy1, fullcopy2 = {}, {}
......@@ -345,6 +345,6 @@
bothnew = sorted(addedinm1 & addedinm2)
for f in u1u:
checkcopies(c1, f, m1, m2, ca, limit, diverge, copy1, fullcopy1)
_checkcopies(c1, f, m1, m2, ca, limit, diverge, copy1, fullcopy1)
for f in u2u:
......@@ -349,6 +349,6 @@
for f in u2u:
checkcopies(c2, f, m2, m1, ca, limit, diverge, copy2, fullcopy2)
_checkcopies(c2, f, m2, m1, ca, limit, diverge, copy2, fullcopy2)
copy = dict(copy1.items() + copy2.items())
movewithdir = dict(movewithdir1.items() + movewithdir2.items())
......@@ -373,8 +373,8 @@
% "\n ".join(bothnew))
bothdiverge, _copy, _fullcopy = {}, {}, {}
for f in bothnew:
checkcopies(c1, f, m1, m2, ca, limit, bothdiverge, _copy, _fullcopy)
checkcopies(c2, f, m2, m1, ca, limit, bothdiverge, _copy, _fullcopy)
_checkcopies(c1, f, m1, m2, ca, limit, bothdiverge, _copy, _fullcopy)
_checkcopies(c2, f, m2, m1, ca, limit, bothdiverge, _copy, _fullcopy)
for of, fl in bothdiverge.items():
if len(fl) == 2 and fl[0] == fl[1]:
copy[fl[0]] = of # not actually divergent, just matching renames
......@@ -454,7 +454,7 @@
return copy, movewithdir, diverge, renamedelete
def checkcopies(ctx, f, m1, m2, ca, limit, diverge, copy, fullcopy):
def _checkcopies(ctx, f, m1, m2, ca, limit, diverge, copy, fullcopy):
"""
check possible copies of f from m1 to m2
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment