Mercurial > hg > mercurial-source
diff mercurial/revset.py @ 22494:14f6cebfcb8a
revset: document the choice made in __generatorset.__iter__
The method code looks a bit ugly but has good reasons to. We document them
to prevent naive refactoring in the future.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 16 Sep 2014 23:42:41 -0700 |
parents | e40bb83d0989 |
children | 668b26d32bf6 |
line wrap: on
line diff
--- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -2648,6 +2648,12 @@ yield x return + # We have to use this complex iteration strategy to allow multiple + # iterations at the same time. We need to be able to catch revision + # removed from `consumegen` and added to genlist in another instance. + # + # Getting rid of it would provide an about 15% speed up on this + # iteration. i = 0 genlist = self._genlist consume = self._consumegen()