diff mercurial/localrepo.py @ 32481:a87dabb053d0

localrepo: document that __contains__() may raise LookupError
author Yuya Nishihara <yuya@tcha.org>
date Thu, 25 May 2017 23:18:02 +0900
parents b647b923486f
children a722c8e17363
line wrap: on
line diff
--- 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