diff -r c95b2f40db7c -r 74802979dd9d mercurial/patch.py --- a/mercurial/patch.py Sun Oct 06 17:45:05 2019 -0400 +++ b/mercurial/patch.py Sun Oct 06 17:59:15 2019 -0400 @@ -1331,7 +1331,11 @@ fixoffset += chunk.removed - chunk.added return ( sum( - [h for h in applied.itervalues() if h[0].special() or len(h) > 1], + [ + h + for h in pycompat.itervalues(applied) + if h[0].special() or len(h) > 1 + ], [], ), {},