comparison mercurial/revset.py @ 22736:3439b66f506e

spanset: use base implementation for __and__
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 03 Oct 2014 00:30:58 -0500
parents 38f0ab661b0f
children e03ece039b3a
comparison
equal deleted inserted replaced
22735:38f0ab661b0f 22736:3439b66f506e
2917 def __nonzero__(self): 2917 def __nonzero__(self):
2918 for r in self: 2918 for r in self:
2919 return True 2919 return True
2920 return False 2920 return False
2921 2921
2922 def __and__(self, x):
2923 return orderedlazyset(self, x.__contains__,
2924 ascending=self.isascending())
2925
2926 def __sub__(self, x): 2922 def __sub__(self, x):
2927 filterfunc = x.__contains__ 2923 filterfunc = x.__contains__
2928 return orderedlazyset(self, lambda r: not filterfunc(r), 2924 return orderedlazyset(self, lambda r: not filterfunc(r),
2929 ascending=self.isascending()) 2925 ascending=self.isascending())
2930 2926