mercurial/localrepo.py
changeset 9924 ea3acaae25bb
parent 9820 0b999aec64e8
child 9934 720f70b720d3
equal deleted inserted replaced
9923:c0b79fdfd214 9924:ea3acaae25bb
   125 
   125 
   126     def __getitem__(self, changeid):
   126     def __getitem__(self, changeid):
   127         if changeid is None:
   127         if changeid is None:
   128             return context.workingctx(self)
   128             return context.workingctx(self)
   129         return context.changectx(self, changeid)
   129         return context.changectx(self, changeid)
       
   130 
       
   131     def __contains__(self, changeid):
       
   132         try:
       
   133             return bool(self.lookup(changeid))
       
   134         except error.RepoLookupError:
       
   135             return False
   130 
   136 
   131     def __nonzero__(self):
   137     def __nonzero__(self):
   132         return True
   138         return True
   133 
   139 
   134     def __len__(self):
   140     def __len__(self):