##// END OF EJS Templates
revset: use spanset.isdescending in multiple simple places...
Pierre-Yves David -
r22482:2e40cda4 default
parent child Browse files
Show More
@@ -2747,15 +2747,15 b' class spanset(_orderedsetmixin):'
2747 2747 self._hiddenrevs = repo.changelog.filteredrevs
2748 2748
2749 2749 def ascending(self):
2750 if self._start > self._end:
2750 if not self.isascending():
2751 2751 self.reverse()
2752 2752
2753 2753 def descending(self):
2754 if self._start < self._end:
2754 if not self.isdescending():
2755 2755 self.reverse()
2756 2756
2757 2757 def __iter__(self):
2758 if self._start <= self._end:
2758 if self.isascending():
2759 2759 iterrange = xrange(self._start, self._end)
2760 2760 else:
2761 2761 iterrange = xrange(self._start, self._end, -1)
@@ -2826,7 +2826,7 b' class spanset(_orderedsetmixin):'
2826 2826
2827 2827 def reverse(self):
2828 2828 # Just switch the _start and _end parameters
2829 if self._start <= self._end:
2829 if self.isascending():
2830 2830 self._start, self._end = self._end - 1, self._start - 1
2831 2831 else:
2832 2832 self._start, self._end = self._end + 1, self._start + 1
General Comments 0
You need to be logged in to leave comments. Login now