mercurial/revset.py
changeset 22749 672f15ee2a1d
parent 22748 852191f71df1
child 22750 66e2b648deef
equal deleted inserted replaced
22748:852191f71df1 22749:672f15ee2a1d
  2584     def _list(self):
  2584     def _list(self):
  2585         if not self._genlist:
  2585         if not self._genlist:
  2586             self._genlist = baseset(self._iterator())
  2586             self._genlist = baseset(self._iterator())
  2587         return self._genlist
  2587         return self._genlist
  2588 
  2588 
  2589     def ascending(self):
       
  2590         if self._ascending is None:
       
  2591             self.sort()
       
  2592             self._ascending = True
       
  2593         else:
       
  2594             if not self._ascending:
       
  2595                 self.reverse()
       
  2596 
       
  2597     def descending(self):
       
  2598         if self._ascending is None:
       
  2599             self.sort(reverse=True)
       
  2600             self._ascending = False
       
  2601         else:
       
  2602             if self._ascending:
       
  2603                 self.reverse()
       
  2604 
       
  2605     def _iterator(self):
  2589     def _iterator(self):
  2606         """Iterate over both collections without repeating elements
  2590         """Iterate over both collections without repeating elements
  2607 
  2591 
  2608         If the ascending attribute is not set, iterate over the first one and
  2592         If the ascending attribute is not set, iterate over the first one and
  2609         then over the second one checking for membership on the first one so we
  2593         then over the second one checking for membership on the first one so we