Mercurial > hg
changeset 9930:a9cab6c49d61
Merge with mpm
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Tue, 24 Nov 2009 14:45:29 -0800 |
parents | ea3acaae25bb (diff) 193a8d539e21 (current diff) |
children | 2fcbef9a349a |
files | |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/localrepo.py Tue Nov 24 20:40:16 2009 +0100 +++ b/mercurial/localrepo.py Tue Nov 24 14:45:29 2009 -0800 @@ -128,6 +128,12 @@ return context.workingctx(self) return context.changectx(self, changeid) + def __contains__(self, changeid): + try: + return bool(self.lookup(changeid)) + except error.RepoLookupError: + return False + def __nonzero__(self): return True