diff --git a/mercurial/revset.py b/mercurial/revset.py index e353fac7db2633c59d29a5059a08830a498aea49_bWVyY3VyaWFsL3JldnNldC5weQ==..dd716807fd23d48677efd46bad8c759e3da2511e_bWVyY3VyaWFsL3JldnNldC5weQ== 100644 --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -2243,11 +2243,7 @@ """Returns a new object with the substraction of the two collections. This is part of the mandatory API for smartset.""" - if isinstance(other, baseset): - s = other.set() - else: - s = set(other) - return baseset(self.set() - s) + return self.filter(lambda x: x not in other) def __and__(self, other): """Returns a new object with the intersection of the two collections. diff --git a/tests/test-revset.t b/tests/test-revset.t index e353fac7db2633c59d29a5059a08830a498aea49_dGVzdHMvdGVzdC1yZXZzZXQudA==..dd716807fd23d48677efd46bad8c759e3da2511e_dGVzdHMvdGVzdC1yZXZzZXQudA== 100644 --- a/tests/test-revset.t +++ b/tests/test-revset.t @@ -1008,6 +1008,11 @@ $ log 'min(1 or 2) and not 1' $ log 'last(1 or 2, 1) and not 2' +issue4289 - ordering of built-ins + $ hg log -M -q -r 3:2 + 3:8528aa5637f2 + 2:5ed5505e9f1c + test revsets started with 40-chars hash (issue3669) $ ISSUE3669_TIP=`hg tip --template '{node}'`