Mercurial > hg
changeset 33707: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 | 01a1c4e66816 |
children | 71b77b61ed60 |
files | mercurial/dirstate.py |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
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()