changeset 30137:f85f9e069e09

checkcopies: add an inline comment about the '_related' call This helps understanding the flow of the function.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Sat, 08 Oct 2016 23:00:55 +0200
parents 8797eadb5d90
children 733fb9f7bc92
files mercurial/copies.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/copies.py	Sat Oct 08 19:03:16 2016 +0200
+++ b/mercurial/copies.py	Sat Oct 08 23:00:55 2016 +0200
@@ -526,6 +526,8 @@
         if m2[of] == mb.get(of):
             return # no merge needed, quit early
         c2 = getfctx(of, m2[of])
+        # c2 might be a plain new file on added on destination side that is
+        # unrelated to the droids we are looking for.
         cr = _related(oc, c2, base.rev())
         if cr and (of == f or of == c2.path()): # non-divergent
             copy[f] = of