equal
deleted
inserted
replaced
2800 # we need to consume all and try again |
2800 # we need to consume all and try again |
2801 for x in self._consumegen(): |
2801 for x in self._consumegen(): |
2802 pass |
2802 pass |
2803 return self.first() |
2803 return self.first() |
2804 if self: |
2804 if self: |
2805 return it.next() |
2805 return it().next() |
2806 return None |
2806 return None |
2807 |
2807 |
2808 def last(self): |
2808 def last(self): |
2809 if self._ascending: |
2809 if self._ascending: |
2810 it = self.fastdesc |
2810 it = self.fastdesc |
2814 # we need to consume all and try again |
2814 # we need to consume all and try again |
2815 for x in self._consumegen(): |
2815 for x in self._consumegen(): |
2816 pass |
2816 pass |
2817 return self.first() |
2817 return self.first() |
2818 if self: |
2818 if self: |
2819 return it.next() |
2819 return it().next() |
2820 return None |
2820 return None |
2821 |
2821 |
2822 def spanset(repo, start=None, end=None): |
2822 def spanset(repo, start=None, end=None): |
2823 """factory function to dispatch between fullreposet and actual spanset |
2823 """factory function to dispatch between fullreposet and actual spanset |
2824 |
2824 |