diff -r 06de08b36c82 -r 2cce2fa5bcf7 mercurial/patch.py --- a/mercurial/patch.py Mon Feb 21 11:24:57 2022 -0700 +++ b/mercurial/patch.py Tue Mar 01 20:52:32 2022 -0800 @@ -1342,11 +1342,7 @@ fixoffset += chunk.removed - chunk.added return ( sum( - [ - h - for h in pycompat.itervalues(applied) - if h[0].special() or len(h) > 1 - ], + [h for h in applied.values() if h[0].special() or len(h) > 1], [], ), {},