changeset 41513:a5d8824483ba

diff: drop duplicate filter of copies by destination I'm pretty sure we don't need to filter copies by destination, at least since the previous patch. Differential Revision: https://phab.mercurial-scm.org/D5790
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 31 Jan 2019 16:51:52 -0800
parents a02c8b605d31
children 8c13f7b0ace6
files mercurial/patch.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/patch.py	Thu Jan 31 16:32:54 2019 -0800
+++ b/mercurial/patch.py	Thu Jan 31 16:51:52 2019 -0800
@@ -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)