# HG changeset patch # User Bryan O'Sullivan # Date 1259102729 28800 # Node ID a9cab6c49d61d3fe10dc524377952f1b1d0bc128 # Parent ea3acaae25bb93f3f85869f7c7142d20b6d3b324# Parent 193a8d539e21b80baa695002d3c3549fbfe1ace4 Merge with mpm diff -r 193a8d539e21 -r a9cab6c49d61 mercurial/localrepo.py --- 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