changeset 19668:9d56a3359011

commitablectx: move __contains__ from workingctx
author Sean Farley <sean.michael.farley@gmail.com>
date Wed, 14 Aug 2013 15:29:09 -0500
parents 40040e4015f9
children 8120ea4b87f5
files mercurial/context.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/context.py	Wed Aug 14 15:28:43 2013 -0500
+++ b/mercurial/context.py	Wed Aug 14 15:29:09 2013 -0500
@@ -862,6 +862,9 @@
     def __nonzero__(self):
         return True
 
+    def __contains__(self, key):
+        return self._repo.dirstate[key] not in "?r"
+
 class workingctx(commitablectx):
     """A workingctx object makes access to data related to
     the current working directory convenient.
@@ -875,9 +878,6 @@
                  changes=None):
         super(workingctx, self).__init__(repo, text, user, date, extra, changes)
 
-    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