mercurial/revset.py
changeset 22728 bf5ff3686100
parent 22727 0f3e240a1c35
child 22729 f7b0ebe6ad42
equal deleted inserted replaced
22727:0f3e240a1c35 22728:bf5ff3686100
  2272 
  2272 
  2273     def __and__(self, other):
  2273     def __and__(self, other):
  2274         """Returns a new object with the intersection of the two collections.
  2274         """Returns a new object with the intersection of the two collections.
  2275 
  2275 
  2276         This is part of the mandatory API for smartset."""
  2276         This is part of the mandatory API for smartset."""
  2277         raise NotImplementedError()
  2277         return self.filter(other.__contains__)
  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."""