--- a/mercurial/copies.py Thu Oct 13 02:03:54 2016 +0200
+++ b/mercurial/copies.py Tue Oct 18 00:00:43 2016 +0200
@@ -231,23 +231,27 @@
return _chain(x, y, _backwardrenames(x, a),
_forwardcopies(a, y, match=match))
-def _computenonoverlap(repo, c1, c2, addedinm1, addedinm2):
+def _computenonoverlap(repo, c1, c2, addedinm1, addedinm2, baselabel=''):
"""Computes, based on addedinm1 and addedinm2, the files exclusive to c1
and c2. This is its own function so extensions can easily wrap this call
to see what files mergecopies is about to process.
Even though c1 and c2 are not used in this function, they are useful in
other extensions for being able to read the file nodes of the changed files.
+
+ "baselabel" can be passed to help distinguish the multiple computations
+ done in the graft case.
"""
u1 = sorted(addedinm1 - addedinm2)
u2 = sorted(addedinm2 - addedinm1)
+ header = " unmatched files in %s"
+ if baselabel:
+ header += ' (from %s)' % baselabel
if u1:
- repo.ui.debug(" unmatched files in local:\n %s\n"
- % "\n ".join(u1))
+ repo.ui.debug("%s:\n %s\n" % (header % 'local', "\n ".join(u1)))
if u2:
- repo.ui.debug(" unmatched files in other:\n %s\n"
- % "\n ".join(u2))
+ repo.ui.debug("%s:\n %s\n" % (header % 'other', "\n ".join(u2)))
return u1, u2
def _makegetfctx(ctx):