Patchwork [1,of,4] mergestate: make unresolved() use iteritems()

login
register
mail settings
Submitter via Mercurial-devel
Date July 6, 2017, 5:39 p.m.
Message ID <d4916d8e63be5ef5f3d6.1499362764@martinvonz.svl.corp.google.com>
Download mbox | patch
Permalink /patch/22025/
State Accepted
Headers show

Comments

via Mercurial-devel - July 6, 2017, 5:39 p.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1448990770 28800
#      Tue Dec 01 09:26:10 2015 -0800
# Node ID d4916d8e63be5ef5f3d69d12ad61cffc45a0090c
# Parent  89796a25d4bb91fb418ad3e70faad2c586902ffb
mergestate: make unresolved() use iteritems()

mergestate.unresolved() is a generator, so it seems better for it to
rely on iteritems() than items(), although it also seems unlikely for
it to make a noticeable difference.

Patch

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -445,7 +445,7 @@ 
     def unresolved(self):
         """Obtain the paths of unresolved files."""
 
-        for f, entry in self._state.items():
+        for f, entry in self._state.iteritems():
             if entry[0] == 'u':
                 yield f