Patchwork [7,of,8] mergecopies: introduce new dicts to handle more complex copy cases (issue4028)

login
register
mail settings
Submitter Gábor Stefanik
Date Oct. 4, 2016, 2:06 p.m.
Message ID <54afc2a4b419b0f972e7.1475589965@waste.org>
Download mbox | patch
Permalink /patch/16846/
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 1475494736 -7200
#      Mon Oct 03 13:38:56 2016 +0200
# Node ID 54afc2a4b419b0f972e75e53df4336ed2a5b32b6
# Parent  a1b8ff5837d36693338b51966dd92249e728cba2
mergecopies: introduce new dicts to handle more complex copy cases (issue4028)

Patch

diff --git a/mercurial/copies.py b/mercurial/copies.py
--- a/mercurial/copies.py
+++ b/mercurial/copies.py
@@ -333,9 +333,10 @@ 
 
     # see _checkcopies documentation below for these dicts
     copy1, copy2 = {}, {}
+    incomplete1, incomplete2 = {}, {}
     movewithdir1, movewithdir2 = {}, {}
     fullcopy1, fullcopy2 = {}, {}
-    diverge = {}
+    diverge, incompletediverge = {}, {}
 
     # find interesting file sets from manifests
     addedinm1 = m1.filesnotin(ma)
@@ -373,7 +374,10 @@ 
     if bothnew:
         repo.ui.debug("  unmatched files new in both:\n   %s\n"
                       % "\n   ".join(bothnew))
-    bothdiverge, _copy, _fullcopy = {}, {}, {}
+    bothdiverge = {}
+    _copy, _fullcopy = {}, {} # dummy dicts
+    # reset incomplete dicts for bothdiverge generation
+    incomplete1, incomplete2, incompletediverge = {}, {}, {}
     for f in bothnew:
         _checkcopies(c1, f, m1, m2, ca, ca, False, limit, bothdiverge, _copy,
                      _fullcopy)