diff --git a/mercurial/revset.py b/mercurial/revset.py --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -2419,6 +2419,12 @@ class _addset(object): return orderedlazyset(self, filterfunc, ascending=self._ascending) return lazyset(self, filterfunc) + def __sub__(self, other): + filterfunc = lambda r: r not in other + if self._ascending is not None: + return orderedlazyset(self, filterfunc, ascending=self._ascending) + return lazyset(self, filterfunc) + def _iterator(self): """Iterate over both collections without repeating elements