# HG changeset patch # User Pierre-Yves David # Date 2014-10-03 00:22:17 # Node ID aeacc2055f0de57016b142aaa9ec451d2bcc7119 # Parent f7b0ebe6ad422254b31d6b5ccb8c4c544e404334 abstractsmartset: add default implementation for __sub__ diff --git a/mercurial/revset.py b/mercurial/revset.py --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -2291,7 +2291,8 @@ class abstractsmartset(object): """Returns a new object with the substraction of the two collections. This is part of the mandatory API for smartset.""" - raise NotImplementedError() + c = other.__contains__ + return self.filter(lambda r: not c(r)) def filter(self, condition): """Returns this smartset filtered by condition as a new smartset.