This is an archive of the discontinued Mercurial Phabricator instance.

storageutil: consistently raise LookupError (API)
ClosedPublic

Authored by indygreg on Sep 28 2018, 8:18 PM.

Details

Summary

The interface docs say this is supposed to raise LookupError on
failure. But for invalid revision number input, it could raise
IndexError because ifileindex.node() is documented to raise
IndexError.

lookup() for files isn't used that much (pretty much just in
basefilectx in core AFAICT). And callers should already be catching
LookupError. So I don't anticipate that much fallout from this
change.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.