--- a/mercurial/merge.py Wed Aug 28 23:25:26 2024 +0200
+++ b/mercurial/merge.py Fri Sep 06 02:12:19 2024 +0200
@@ -528,7 +528,7 @@
"""
# We mutate the items in the dict during iteration, so iterate
# over a copy.
- for f, action in mresult.filemap():
+ for f, action in list(mresult.filemap()):
if narrowmatch(f):
pass
elif not branchmerge:
@@ -669,7 +669,7 @@
return sum(len(self._actionmapping[a]) for a in actions)
def filemap(self, sort=False):
- if sorted:
+ if sort:
for key, val in sorted(self._filemapping.items()):
yield key, val
else: