Patchwork D6344: copies: remove redundant filtering of ping-pong renames in _chain()

login
register
mail settings
Submitter phabricator
Date May 6, 2019, 4 a.m.
Message ID <f5fdea9a50afe2c8cacab5650944948c@localhost.localdomain>
Download mbox | patch
Permalink /patch/39963/
State Not Applicable
Headers show

Comments

phabricator - May 6, 2019, 4 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG00e065fb1469: copies: remove redundant filtering of ping-pong renames in _chain() (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6344?vs=15019&id=15020

REVISION DETAIL
  https://phab.mercurial-scm.org/D6344

AFFECTED FILES
  mercurial/copies.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/copies.py b/mercurial/copies.py
--- a/mercurial/copies.py
+++ b/mercurial/copies.py
@@ -130,10 +130,8 @@ 
     t = a.copy()
     for k, v in b.iteritems():
         if v in t:
-            # found a chain, i.e. cases 3 & 4.
-            if t[v] != k:
-                # file wasn't renamed back to itself (i.e. case 4, not 3)
-                t[k] = t[v]
+            # Found a chain, i.e. cases 3 & 4. We'll remove case 3 later.
+            t[k] = t[v]
         else:
             # Renamed only in 'b', i.e. cases 5 & 6. We'll remove case 5 later.
             t[k] = v