mercurial/revset.py
changeset 23426 19ebd2f88fc7
parent 23321 d716b1cec5cf
parent 23413 0c432696dae3
child 23466 d5b1a452cc32
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