Show More
@@ -46,7 +46,7 b' def _revancestors(repo, revs, followfirs' | |||
|
46 | 46 | if parent != node.nullrev: |
|
47 | 47 | heapq.heappush(h, -parent) |
|
48 | 48 | |
|
49 |
return |
|
|
49 | return generatorset(iterate(), iterasc=False) | |
|
50 | 50 | |
|
51 | 51 | def _revdescendants(repo, revs, followfirst): |
|
52 | 52 | """Like revlog.descendants() but supports followfirst.""" |
@@ -70,7 +70,7 b' def _revdescendants(repo, revs, followfi' | |||
|
70 | 70 | yield i |
|
71 | 71 | break |
|
72 | 72 | |
|
73 |
return |
|
|
73 | return generatorset(iterate(), iterasc=True) | |
|
74 | 74 | |
|
75 | 75 | def _revsbetween(repo, roots, heads): |
|
76 | 76 | """Return all paths between roots and heads, inclusive of both endpoint |
@@ -2513,7 +2513,7 b' class addset(abstractsmartset):' | |||
|
2513 | 2513 | iter1 = iter(self._r1) |
|
2514 | 2514 | iter2 = iter(self._r2) |
|
2515 | 2515 | gen = self._iterordered(self._ascending, iter1, iter2) |
|
2516 |
self._iter = |
|
|
2516 | self._iter = generatorset(gen) | |
|
2517 | 2517 | return self._iter |
|
2518 | 2518 | |
|
2519 | 2519 | def __iter__(self): |
@@ -2608,7 +2608,7 b' class addset(abstractsmartset):' | |||
|
2608 | 2608 | if self._ascending is not None: |
|
2609 | 2609 | self._ascending = not self._ascending |
|
2610 | 2610 | |
|
2611 |
class |
|
|
2611 | class generatorset(abstractsmartset): | |
|
2612 | 2612 | """Wrap a generator for lazy iteration |
|
2613 | 2613 | |
|
2614 | 2614 | Wrapper structure for generators that provides lazy membership and can |
@@ -2851,7 +2851,7 b' class fullreposet(_spanset):' | |||
|
2851 | 2851 | # object. |
|
2852 | 2852 | other = baseset(other - self._hiddenrevs) |
|
2853 | 2853 | elif not util.safehasattr(other, 'ascending'): |
|
2854 |
# "other" is |
|
|
2854 | # "other" is generatorset not a real smart set | |
|
2855 | 2855 | # we fallback to the old way (sad kitten) |
|
2856 | 2856 | return super(fullreposet, self).__and__(other) |
|
2857 | 2857 |
General Comments 0
You need to be logged in to leave comments.
Login now