##// END OF EJS Templates
revset: use fastasc/fastdesc switch consistently in addset.__iter__
Yuya Nishihara -
r25130:a94ef7f5 default
parent child Browse files
Show More
@@ -3047,15 +3047,13 b' class addset(abstractsmartset):'
3047 # try to use our own fast iterator if it exists
3047 # try to use our own fast iterator if it exists
3048 self._trysetasclist()
3048 self._trysetasclist()
3049 if self._ascending:
3049 if self._ascending:
3050 it = self.fastasc
3050 attr = 'fastasc'
3051 else:
3051 else:
3052 it = self.fastdesc
3052 attr = 'fastdesc'
3053 it = getattr(self, attr)
3053 if it is not None:
3054 if it is not None:
3054 return it()
3055 return it()
3055 # maybe half of the component supports fast
3056 # maybe half of the component supports fast
3056 attr = 'fastdesc'
3057 if self._ascending:
3058 attr = 'fastasc'
3059 # get iterator for _r1
3057 # get iterator for _r1
3060 iter1 = getattr(self._r1, attr)
3058 iter1 = getattr(self._r1, attr)
3061 if iter1 is None:
3059 if iter1 is None:
General Comments 0
You need to be logged in to leave comments. Login now