basectx: move __contains__ from changectx
authorSean Farley <sean.michael.farley@gmail.com>
Mon, 05 Aug 2013 17:21:38 -0500
changeset 19550 0c8ad779eb36
parent 19549 78155484ae34
child 19551 e07c69145724
basectx: move __contains__ from changectx
mercurial/context.py
--- a/mercurial/context.py	Mon Aug 05 17:21:23 2013 -0500
+++ b/mercurial/context.py	Mon Aug 05 17:21:38 2013 -0500
@@ -53,6 +53,9 @@
     def __ne__(self, other):
         return not (self == other)
 
+    def __contains__(self, key):
+        return key in self._manifest
+
     @propertycache
     def substate(self):
         return subrepo.state(self, self._repo.ui)
@@ -197,9 +200,6 @@
             p = p[:-1]
         return [changectx(self._repo, x) for x in p]
 
-    def __contains__(self, key):
-        return key in self._manifest
-
     def __getitem__(self, key):
         return self.filectx(key)