Patchwork D9599: localrepo: delete obsolete comment about `prefix in repo` raising exception

login
register
mail settings
Submitter phabricator
Date Dec. 14, 2020, 7:54 p.m.
Message ID <differential-rev-PHID-DREV-f7ybi7icwa75xywvt367-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/47897/
State Superseded
Headers show

Comments

phabricator - Dec. 14, 2020, 7:54 p.m.
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  We dropped support for `prefix in repo`, where `prefix` is a hex
  prefix, in 8b86acc7aa64 <https://phab.mercurial-scm.org/rHG8b86acc7aa64130f5b6fa69f5fc20ef4d0b09c42> (context: drop support for looking up context
  by ambiguous changeid (API), 2018-04-28), after having deprecated it a
  while before that. These days you get a `ProgrammingError` instead if
  you pass in a short nodeid.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9599

AFFECTED FILES
  mercurial/localrepo.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -1754,11 +1754,7 @@ 
             return context.workingctx(self)
 
     def __contains__(self, changeid):
-        """True if the given changeid exists
-
-        error.AmbiguousPrefixLookupError is raised if an ambiguous node
-        specified.
-        """
+        """True if the given changeid exists"""
         try:
             self[changeid]
             return True