changeset 24936 | 2aa94b6fe51c |
parent 24932 | 022282152632 |
child 24937 | f5518b47cdd1 |
--- a/mercurial/revset.py Tue May 05 15:33:01 2015 -0700 +++ b/mercurial/revset.py Mon May 04 12:36:48 2015 -0700 @@ -3137,7 +3137,12 @@ self.__contains__ = self._desccontains def __nonzero__(self): - for r in self: + # Do not use 'for r in self' because it will enforce the iteration + # order (default ascending), possibly unrolling a whole descending + # iterator. + if self._genlist: + return True + for r in self._consumegen(): return True return False