# HG changeset patch # User Sean Farley # Date 1404446497 18000 # Node ID 04f5b5e3792e6bbdaf9b70aaf86db2649b2354aa # Parent 7cfd94ec5d30a4da29700466024c62c51565c372 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. diff -r 7cfd94ec5d30 -r 04f5b5e3792e 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()