mercurial/revset.py
branchstable
changeset 25265 e16456831516
parent 25094 8b99e9a8db05
child 25270 61b3529e2377
--- a/mercurial/revset.py	Fri May 22 12:13:18 2015 -0500
+++ b/mercurial/revset.py	Sun May 24 10:29:33 2015 +0900
@@ -330,7 +330,8 @@
 
 def stringset(repo, subset, x):
     x = repo[x].rev()
-    if x in subset:
+    if (x in subset
+        or x == node.nullrev and isinstance(subset, fullreposet)):
         return baseset([x])
     return baseset()
 
@@ -1905,7 +1906,7 @@
 def wdir(repo, subset, x):
     # i18n: "wdir" is a keyword
     getargs(x, 0, 0, _("wdir takes no arguments"))
-    if None in subset:
+    if None in subset or isinstance(subset, fullreposet):
         return baseset([None])
     return baseset()
 
@@ -3408,11 +3409,6 @@
     def __init__(self, repo):
         super(fullreposet, self).__init__(repo)
 
-    def __contains__(self, rev):
-        # assumes the given rev is valid
-        hidden = self._hiddenrevs
-        return not (hidden and rev in hidden)
-
     def __and__(self, other):
         """As self contains the whole repo, all of the other set should also be
         in self. Therefore `self & other = other`.