Patchwork [5,of,8] copies: don't record divergence for files needing no merge (issue4028)

login
register
mail settings
Submitter Gábor Stefanik
Date Oct. 4, 2016, 2:06 p.m.
Message ID <bc8729a69d10d6149871.1475589963@waste.org>
Download mbox | patch
Permalink /patch/16844/
State Superseded
Headers show

Comments

Gábor Stefanik - Oct. 4, 2016, 2:06 p.m.
# HG changeset patch
# User Gábor Stefanik <gabor.stefanik@nng.com>
# Date 1475494199 -7200
#      Mon Oct 03 13:29:59 2016 +0200
# Node ID bc8729a69d10d61498712d5dab773918f1edcde0
# Parent  a2b50d0c5dc69a4ce15b6a54d030e478c0f4cc41
copies: don't record divergence for files needing no merge (issue4028)

Patch

diff --git a/mercurial/copies.py b/mercurial/copies.py
--- a/mercurial/copies.py
+++ b/mercurial/copies.py
@@ -524,13 +524,12 @@ 
         if of not in m2:
             continue # no match, keep looking
         if m2[of] == ma.get(of):
-            break # no merge needed, quit early
+            return # no merge needed, quit early
         c2 = getfctx(of, m2[of])
         cr = _related(oc, c2, ca.rev())
         if cr and (of == f or of == c2.path()): # non-divergent
             copy[f] = of
-            of = None
-            break
+            return
 
     if of in ma:
         diverge.setdefault(of, []).append(f)