comparison mercurial/revset.py @ 22746:11a543b5de6f

addset: use base implementation for __sub__
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 03 Oct 2014 01:32:50 -0500
parents 021660aeb75e
children 510432d66638
comparison
equal deleted inserted replaced
22745:021660aeb75e 22746:11a543b5de6f
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 __sub__(self, other):
2611 filterfunc = lambda r: r not in other
2612 if self._ascending is not None:
2613 return orderedlazyset(self, filterfunc, ascending=self._ascending)
2614 return filteredset(self, filterfunc)
2615
2616 def __add__(self, other): 2610 def __add__(self, other):
2617 """When both collections are ascending or descending, preserve the order 2611 """When both collections are ascending or descending, preserve the order
2618 """ 2612 """
2619 kwargs = {} 2613 kwargs = {}
2620 if self._ascending is not None: 2614 if self._ascending is not None: