mercurial/smartset.py
changeset 51111 5ae05937b98f
parent 50929 18c8c18993f0
--- 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