mercurial/revset.py
changeset 22861 546fa6576815
parent 22860 1dd178277cf5
child 22862 9e5576f822cc
equal deleted inserted replaced
22860:1dd178277cf5 22861:546fa6576815
  2281 
  2281 
  2282     def __add__(self, other):
  2282     def __add__(self, other):
  2283         """Returns a new object with the union of the two collections.
  2283         """Returns a new object with the union of the two collections.
  2284 
  2284 
  2285         This is part of the mandatory API for smartset."""
  2285         This is part of the mandatory API for smartset."""
  2286         kwargs = {}
  2286         return addset(self, other)
  2287         if self.isascending() and other.isascending():
       
  2288             kwargs['ascending'] = True
       
  2289         if self.isdescending() and other.isdescending():
       
  2290             kwargs['ascending'] = False
       
  2291         return addset(self, other, **kwargs)
       
  2292 
  2287 
  2293     def __sub__(self, other):
  2288     def __sub__(self, other):
  2294         """Returns a new object with the substraction of the two collections.
  2289         """Returns a new object with the substraction of the two collections.
  2295 
  2290 
  2296         This is part of the mandatory API for smartset."""
  2291         This is part of the mandatory API for smartset."""