mercurial/revset.py
changeset 22691 d8a08b68f754
parent 22690 d7ab5684711f
child 22692 78c916f24dd9
equal deleted inserted replaced
22690:d7ab5684711f 22691:d8a08b68f754
  2236 
  2236 
  2237     @util.propertycache
  2237     @util.propertycache
  2238     def __contains__(self):
  2238     def __contains__(self):
  2239         return self.set().__contains__
  2239         return self.set().__contains__
  2240 
  2240 
       
  2241     def __nonzero__(self):
       
  2242         return bool(len(self))
       
  2243 
  2241     def __sub__(self, other):
  2244     def __sub__(self, other):
  2242         """Returns a new object with the substraction of the two collections.
  2245         """Returns a new object with the substraction of the two collections.
  2243 
  2246 
  2244         This is part of the mandatory API for smartset."""
  2247         This is part of the mandatory API for smartset."""
  2245         # If we are operating on 2 baseset, do the computation now since all
  2248         # If we are operating on 2 baseset, do the computation now since all