This is an archive of the discontinued Mercurial Phabricator instance.

upgrade: implement partial upgrade for upgrading persistent-nodemap
ClosedPublic

Authored by pulkit on Jan 31 2021, 2:35 PM.

Details

Summary

Upgrading repositories to use persistent nodemap should be fast and easy as it
requires only two things:

  1. Updating the requirements
  2. Writing a persistent-nodemap on disk

For both of the steps above, we don't need to edit existing revlogs.

This patch makes upgrade only do the above mentioned two steps if we are
only upgarding to use persistent-nodemap feature.

Since nodemap.persist_nodemap() assumes that there exists a nodemap file for
the given revlog if we are trying to call it, this patch adds force argument
to create a file if does not exist which is true in our upgrade case.

The test changes demonstrate that we no longer write nodemap files for manifest
after upgrade which I think is desirable.

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

pulkit created this revision.Jan 31 2021, 2:35 PM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.