( )⚙ D10077 rhg: Don’t attempt to read persistent nodemap without .hg/requires opt-in

This is an archive of the discontinued Mercurial Phabricator instance.

rhg: Don’t attempt to read persistent nodemap without .hg/requires opt-in
ClosedPublic

Authored by SimonSapin on Feb 25 2021, 3:32 PM.

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

SimonSapin created this revision.Feb 25 2021, 3:32 PM
pulkit added a subscriber: pulkit.Feb 27 2021, 12:11 PM
pulkit added inline comments.
rust/hg-core/src/revlog/nodemap_docket.rs
47

IIRC, the python code raises an error in this case.

SimonSapin added inline comments.Mar 1 2021, 6:02 AM
rust/hg-core/src/revlog/nodemap_docket.rs
47

I what case do you mean? This Rust code looks equivalent to me to the Python code here https://www.mercurial-scm.org/repo/hg/file/5.7/mercurial/revlog.py#l450

(Callers set persistentnodemap to opener.options.get(b'persistent-nodemap', False), which in turn is set based on if requirementsmod.NODEMAP_REQUIREMENT in requirements.)

This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.