# HG changeset patch # User Yuya Nishihara # Date 1495721882 -32400 # Node ID a87dabb053d0bc17fb34e1bf0512c5a25f8b0b4b # Parent 43ae9e6eaabaeeb8c070dd04a6280180745b5256 localrepo: document that __contains__() may raise LookupError diff -r 43ae9e6eaaba -r a87dabb053d0 mercurial/localrepo.py --- a/mercurial/localrepo.py Sun May 21 15:56:02 2017 +0200 +++ b/mercurial/localrepo.py Thu May 25 23:18:02 2017 +0900 @@ -573,6 +573,10 @@ return context.changectx(self, changeid) def __contains__(self, changeid): + """True if the given changeid exists + + error.LookupError is raised if an ambiguous node specified. + """ try: self[changeid] return True