committablectx: move __contains__ into workingctx
authorSean Farley <sean.michael.farley@gmail.com>
Thu, 03 Jul 2014 23:01:37 -0500
changeset 21845 04f5b5e3792e
parent 21844 7cfd94ec5d30
child 21846 8f23f8096606
committablectx: move __contains__ into workingctx This was mistakenly moved from workingctx to committablectx in 9d56a3359011. Since the method is querying the dirstate, the only logical place is for it to reside is in workingctx.
mercurial/context.py
--- a/mercurial/context.py	Wed Jul 02 15:24:43 2014 -0500
+++ b/mercurial/context.py	Thu Jul 03 23:01:37 2014 -0500
@@ -976,9 +976,6 @@
     def __nonzero__(self):
         return True
 
-    def __contains__(self, key):
-        return self._repo.dirstate[key] not in "?r"
-
     def _buildflagfunc(self):
         # Create a fallback function for getting file flags when the
         # filesystem doesn't support them
@@ -1179,6 +1176,9 @@
             if d[f] != 'r':
                 yield f
 
+    def __contains__(self, key):
+        return self._repo.dirstate[key] not in "?r"
+
     @propertycache
     def _parents(self):
         p = self._repo.dirstate.parents()