This is an archive of the discontinued Mercurial Phabricator instance.

localrepo: define storage backend in creation options (API)
ClosedPublic

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

Details

Summary

We add an experimental config option to define the storage backend
for new repositories. By default, it uses "revlogv1," which maps to
the current and only modern supported repository format.

We add a "backend" creation option to control which backend to
use. It defaults to using the value from the config option.

newreporequirements() will now barf if it sees a "backend" value
that isn't "revlogv1." This forces extensions to monkeypatch the
function to handle requirements derivation for custom backends.

In order for this to "just work," we factored out obtaining the
default creation options into its own function and made callers
of newreporequirements() responsible for passing in valid data.
Without this, direct callers of newreporequirements() wouldn't
get the proper results.

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.Sep 28 2018, 8:18 PM
This revision was automatically updated to reflect the committed changes.