diff -r 854b907527e5 -r f5d7cfcbb4d3 mercurial/context.py --- a/mercurial/context.py Fri Jul 11 18:46:02 2008 -0500 +++ b/mercurial/context.py Fri Jul 11 18:46:02 2008 -0500 @@ -501,6 +501,9 @@ def __nonzero__(self): return True + def __contains__(self, key): + return self._dirstate[f] not in "?r" + def __getattr__(self, name): if name == '_status': self._status = self._repo.status(unknown=True)