Patchwork D5790: diff: drop duplicate filter of copies by destination

login
register
mail settings
Submitter phabricator
Date Feb. 1, 2019, 6:15 p.m.
Message ID <1da2050a8fdb8c69d3541a73d97da24c@localhost.localdomain>
Download mbox | patch
Permalink /patch/38297/
State Not Applicable
Headers show

Comments

phabricator - Feb. 1, 2019, 6:15 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG913bd76ceed5: diff: drop duplicate filter of copies by destination (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5790?vs=13666&id=13673

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

AFFECTED FILES
  mercurial/patch.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/patch.py b/mercurial/patch.py
--- a/mercurial/patch.py
+++ b/mercurial/patch.py
@@ -2343,10 +2343,10 @@ 
             copy = copies.pathcopies(ctx1, ctx2, match=match)
 
     if relroot:
-        # filter out copies where either side isn't inside the relative root
-        copy = dict(((dst, src) for (dst, src) in copy.iteritems()
-                     if dst.startswith(relroot)
-                     and src.startswith(relroot)))
+        # filter out copies where source side isn't inside the relative root
+        # (copies.pathcopies() already filtered out the destination)
+        copy = {dst: src for dst, src in copy.iteritems()
+                if src.startswith(relroot)}
 
     modifiedset = set(modified)
     addedset = set(added)