changeset 21268:a0b8a912ec81

merge: simplify mergestate iter
author Mads Kiilerich <mads@kiilerich.com>
date Sun, 13 May 2012 17:45:08 +0200
parents e4f451c8c05c
children fa601c4e03f9
files mercurial/merge.py
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/merge.py	Fri May 09 14:46:50 2014 -0500
+++ b/mercurial/merge.py	Sun May 13 17:45:08 2012 +0200
@@ -248,10 +248,7 @@
         return self._state[dfile][0]
 
     def __iter__(self):
-        l = self._state.keys()
-        l.sort()
-        for f in l:
-            yield f
+        return iter(sorted(self._state))
 
     def files(self):
         return self._state.keys()