diff --git a/mercurial/smartset.py b/mercurial/smartset.py --- a/mercurial/smartset.py +++ b/mercurial/smartset.py @@ -1132,7 +1132,10 @@ class fullreposet(_spanset): # # `other` was used with "&", let's assume this is a set like # object. - other = baseset(other - self._hiddenrevs) + other = baseset(other) + + if self._hiddenrevs: + other = other - self._hiddenrevs other.sort(reverse=self.isdescending()) return other diff --git a/tests/test-phases.t b/tests/test-phases.t --- a/tests/test-phases.t +++ b/tests/test-phases.t @@ -1014,8 +1014,6 @@ The hidden commit is an orphan but doesn summary: my test internal commit $ hg log -G -r 'unstable()' - abort: filtered revision '1' (known-bad-output !) - [10] Test for archived phase