D269: dirstate: simplify and speed up dirstate's __iter__
alex_gaynor (Alex Gaynor)
phabricator at mercurial-scm.org
Tue Aug 8 16:26:32 EDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG36d216dcae6a: dirstate: simplify dirstate's __iter__ (authored by alex_gaynor).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D269?vs=634&id=651
REVISION DETAIL
https://phab.mercurial-scm.org/D269
AFFECTED FILES
mercurial/dirstate.py
CHANGE DETAILS
diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -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()
To: alex_gaynor, durin42, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list