D4807: context: stop catching TypeError when converting hex nodeid to binary
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Sat Sep 29 06:14:17 UTC 2018
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
It has been a programming error to pass a 40-character string that is
not a hex nodeid since https://phab.mercurial-scm.org/rHG8b86acc7aa64130f5b6fa69f5fc20ef4d0b09c42 (context: drop support for looking
up context by ambiguous changeid (API), 2018-04-28), so we can just
let it raise a TypeError.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D4807
AFFECTED FILES
mercurial/context.py
CHANGE DETAILS
diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -435,7 +435,7 @@
return
except error.FilteredLookupError:
raise
- except (TypeError, LookupError):
+ except LookupError:
pass
else:
raise error.ProgrammingError(
To: martinvonz, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list