# HG changeset patch # User Martin von Zweigbergk # Date 2019-02-01 00:51:52 # Node ID a5d8824483ba3b277fc5ccb3c5571e0963bb6c3e # Parent a02c8b605d3136faf0d3f5601eb718901b4075f5 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 diff --git a/mercurial/patch.py b/mercurial/patch.py --- a/mercurial/patch.py +++ b/mercurial/patch.py @@ -2343,10 +2343,10 @@ def diffhunks(repo, node1=None, node2=No 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)