This is an archive of the discontinued Mercurial Phabricator instance.

manifest: use rev() instead of nodemap.__contains__
ClosedPublic

Authored by indygreg on Aug 13 2018, 12:55 PM.

Details

Summary

nodemap is an implementation detail of revlogs and isn't
appropriate to expose on the manifest storage API.

While revlogs don't have a contains, they do have lookup()
for resolving a value to a node. And this calls rev(), whose API
is documented to raise LookupError if a node doesn't exist. And
the parameters to LookupError are identical to what was being
raised here. So this change should be backwards compatible.

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.

Event Timeline

indygreg created this revision.Aug 13 2018, 12:55 PM
This revision was automatically updated to reflect the committed changes.