# HG changeset patch # User Pierre-Yves David # Date 2016-10-08 21:00:55 # Node ID f85f9e069e094dde53f87d0bb909f838b4b97ed0 # Parent 8797eadb5d9030cd6c10ecd119ffe339d6378c86 checkcopies: add an inline comment about the '_related' call This helps understanding the flow of the function. diff --git a/mercurial/copies.py b/mercurial/copies.py --- a/mercurial/copies.py +++ b/mercurial/copies.py @@ -526,6 +526,8 @@ def _checkcopies(ctx, f, m1, m2, base, l 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