mercurial/revset.py
changeset 22729 f7b0ebe6ad42
parent 22728 bf5ff3686100
child 22730 aeacc2055f0d
equal deleted inserted replaced
22728:bf5ff3686100 22729:f7b0ebe6ad42
  2278 
  2278 
  2279     def __add__(self, other):
  2279     def __add__(self, other):
  2280         """Returns a new object with the union of the two collections.
  2280         """Returns a new object with the union of the two collections.
  2281 
  2281 
  2282         This is part of the mandatory API for smartset."""
  2282         This is part of the mandatory API for smartset."""
  2283         raise NotImplementedError()
  2283         kwargs = {}
       
  2284         if self.isascending() and other.isascending():
       
  2285             kwargs['ascending'] = True
       
  2286         if self.isdescending() and other.isdescending():
       
  2287             kwargs['ascending'] = False
       
  2288         return _addset(self, other, **kwargs)
  2284 
  2289 
  2285     def __sub__(self, other):
  2290     def __sub__(self, other):
  2286         """Returns a new object with the substraction of the two collections.
  2291         """Returns a new object with the substraction of the two collections.
  2287 
  2292 
  2288         This is part of the mandatory API for smartset."""
  2293         This is part of the mandatory API for smartset."""