Mercurial > public > mercurial-scm > hg-stable
diff mercurial/dirstate.py @ 33733:36d216dcae6a
dirstate: simplify dirstate's __iter__
Probably also a performance win, but not measurable in perfdirstate.
Differential Revision: https://phab.mercurial-scm.org/D269
author | Alex Gaynor <agaynor@mozilla.com> |
---|---|
date | Tue, 08 Aug 2017 18:53:13 +0000 |
parents | ec306bc6915b |
children | 02a745c20121 |
line wrap: on
line diff
--- a/mercurial/dirstate.py Wed Jul 19 13:34:06 2017 -0700 +++ b/mercurial/dirstate.py Tue Aug 08 18:53:13 2017 +0000 @@ -359,8 +359,7 @@ return key in self._map def __iter__(self): - for x in sorted(self._map): - yield x + return iter(sorted(self._map)) def items(self): return self._map.iteritems()