diff -r 649d3ac37a12 -r d783f945a701 mercurial/patch.py --- a/mercurial/patch.py Sun Oct 06 19:25:18 2019 -0400 +++ b/mercurial/patch.py Mon Oct 07 00:04:04 2019 -0400 @@ -2626,7 +2626,9 @@ # filter out copies where source side isn't inside the matcher # (copies.pathcopies() already filtered out the destination) copy = { - dst: src for dst, src in copy.iteritems() if copysourcematch(src) + dst: src + for dst, src in pycompat.iteritems(copy) + if copysourcematch(src) } modifiedset = set(modified)