--- a/mercurial/merge.py Fri Aug 09 22:45:32 2024 +0200
+++ b/mercurial/merge.py Wed Aug 07 22:05:36 2024 +0200
@@ -521,7 +521,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:
@@ -662,7 +662,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: