mercurial/revset.py
changeset 22745 021660aeb75e
parent 22744 3ed3ca4dfd31
child 22746 11a543b5de6f
equal deleted inserted replaced
22744:3ed3ca4dfd31 22745:021660aeb75e
  2605             self._ascending = False
  2605             self._ascending = False
  2606         else:
  2606         else:
  2607             if self._ascending:
  2607             if self._ascending:
  2608                 self.reverse()
  2608                 self.reverse()
  2609 
  2609 
  2610     def __and__(self, other):
       
  2611         filterfunc = other.__contains__
       
  2612         if self._ascending is not None:
       
  2613             return orderedlazyset(self, filterfunc, ascending=self._ascending)
       
  2614         return filteredset(self, filterfunc)
       
  2615 
       
  2616     def __sub__(self, other):
  2610     def __sub__(self, other):
  2617         filterfunc = lambda r: r not in other
  2611         filterfunc = lambda r: r not in other
  2618         if self._ascending is not None:
  2612         if self._ascending is not None:
  2619             return orderedlazyset(self, filterfunc, ascending=self._ascending)
  2613             return orderedlazyset(self, filterfunc, ascending=self._ascending)
  2620         return filteredset(self, filterfunc)
  2614         return filteredset(self, filterfunc)