smartset: don't ignore hidden revs when intersecting
authorMartin von Zweigbergk <martinvonz@google.com>
Tue, 31 Oct 2023 22:42:46 -0700
changeset 51111 5ae05937b98f
parent 51110 042d32355a4a
child 51118 98910135a3bc
smartset: don't ignore hidden revs when intersecting This fixes the bug I demonstrated in the previous commit, but I'm not sure at all if it's the right way of doing it.
mercurial/smartset.py
tests/test-phases.t
--- a/mercurial/smartset.py	Tue Oct 31 22:33:45 2023 -0700
+++ b/mercurial/smartset.py	Tue Oct 31 22:42:46 2023 -0700
@@ -1132,7 +1132,10 @@
             #
             # `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
--- a/tests/test-phases.t	Tue Oct 31 22:33:45 2023 -0700
+++ b/tests/test-phases.t	Tue Oct 31 22:42:46 2023 -0700
@@ -1014,8 +1014,6 @@
      summary:     my test internal commit
   
   $ hg log -G -r 'unstable()'
-  abort: filtered revision '1' (known-bad-output !)
-  [10]
 
 
 Test for archived phase