Mercurial > hg-stable
changeset 6771:f5d7cfcbb4d3
workingctx: add __contains__ method
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 11 Jul 2008 18:46:02 -0500 |
parents | 854b907527e5 |
children | 84b53eef9964 |
files | mercurial/context.py |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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)