Patchwork D3895: context: raise ProgrammingError on repo['my-tag']

login
register
mail settings
Submitter phabricator
Date July 7, 2018, 12:03 a.m.
Message ID <differential-rev-PHID-DREV-3elgbqnlzwcpbdhok6m6-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/32673/
State Superseded
Headers show

Comments

phabricator - July 7, 2018, 12:03 a.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We had an internal extension that I had failed to migrate off of the
  deprecated API and its "'my-tag' in repo" check just started returning
  False. It took a while to figure out that that was what was
  happening. This patch would have helped.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/context.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -432,6 +432,10 @@ 
                     raise
                 except (TypeError, LookupError):
                     pass
+            else:
+                raise error.ProgrammingError(
+                        "unsupported changeid '%s' of type %s" %
+                        (changeid, type(changeid)))
 
             # lookup failed
         except (error.FilteredIndexError, error.FilteredLookupError):