comparison mercurial/revset.py @ 23426:19ebd2f88fc7

merge with stable
author Matt Mackall <mpm@selenic.com>
date Mon, 01 Dec 2014 19:34:11 -0600
parents d716b1cec5cf 0c432696dae3
children d5b1a452cc32
comparison
equal deleted inserted replaced
23411:2d86f4e38c08 23426:19ebd2f88fc7
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