##// END OF EJS Templates
revset: added ascending attribute to addset class...
Lucas Moscovicz -
r20712:c152e538 default
parent child Browse files
Show More
@@ -2312,13 +2312,18 b' class _addset(object):'
2312 Wrapper structure for lazily adding two structures without losing much
2312 Wrapper structure for lazily adding two structures without losing much
2313 performance on the __contains__ method
2313 performance on the __contains__ method
2314
2314
2315 If the ascending attribute is set, that means the two structures are
2316 ordered in either an ascending or descending way. Therefore, we can add
2317 them mantaining the order by iterating over both at the same time
2318
2315 This class does not duck-type baseset and it's only supposed to be used
2319 This class does not duck-type baseset and it's only supposed to be used
2316 internally
2320 internally
2317 """
2321 """
2318 def __init__(self, revs1, revs2):
2322 def __init__(self, revs1, revs2, ascending=None):
2319 self._r1 = revs1
2323 self._r1 = revs1
2320 self._r2 = revs2
2324 self._r2 = revs2
2321 self._iter = None
2325 self._iter = None
2326 self._ascending = ascending
2322
2327
2323 def _iterator(self):
2328 def _iterator(self):
2324 if not self._iter:
2329 if not self._iter:
General Comments 0
You need to be logged in to leave comments. Login now