mercurial/localrepo.py
changeset 32481 a87dabb053d0
parent 32452 b647b923486f
child 32660 a722c8e17363
equal deleted inserted replaced
32480:43ae9e6eaaba 32481:a87dabb053d0
   571                     for i in xrange(*changeid.indices(len(self)))
   571                     for i in xrange(*changeid.indices(len(self)))
   572                     if i not in self.changelog.filteredrevs]
   572                     if i not in self.changelog.filteredrevs]
   573         return context.changectx(self, changeid)
   573         return context.changectx(self, changeid)
   574 
   574 
   575     def __contains__(self, changeid):
   575     def __contains__(self, changeid):
       
   576         """True if the given changeid exists
       
   577 
       
   578         error.LookupError is raised if an ambiguous node specified.
       
   579         """
   576         try:
   580         try:
   577             self[changeid]
   581             self[changeid]
   578             return True
   582             return True
   579         except error.RepoLookupError:
   583         except error.RepoLookupError:
   580             return False
   584             return False