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

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Mon May 6 00:00:36 EDT 2019


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

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



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


More information about the Mercurial-devel mailing list