mercurial/merge.py
changeset 52644 e627cc25b6f3
parent 52186 e6a44bc91bc2
child 52692 45dc0f874b8c
--- a/mercurial/merge.py	Sun Jan 05 22:23:31 2025 -0500
+++ b/mercurial/merge.py	Sun Jan 05 22:26:16 2025 -0500
@@ -634,13 +634,11 @@
         # TODO: think whether we should return renamedelete and
         # diverge filenames also
         if actions is None:
-            for f in self._filemapping:
-                yield f
+            yield from self._filemapping
 
         else:
             for a in actions:
-                for f in self._actionmapping[a]:
-                    yield f
+                yield from self._actionmapping[a]
 
     def removefile(self, filename):
         """removes a file from the mergeresult object as the file might
@@ -677,11 +675,9 @@
 
     def filemap(self, sort=False):
         if sort:
-            for key, val in sorted(self._filemapping.items()):
-                yield key, val
+            yield from sorted(self._filemapping.items())
         else:
-            for key, val in self._filemapping.items():
-                yield key, val
+            yield from self._filemapping.items()
 
     def addcommitinfo(self, filename, key, value):
         """adds key-value information about filename which will be required