This is an archive of the discontinued Mercurial Phabricator instance.

upgrade: speed up when we have only nodemap to downgrade
ClosedPublic

Authored by pulkit on Feb 15 2021, 5:28 AM.

Details

Summary

Similar to what we do on upgrade, if we have only persistent-nodemap to
downgrade we will just delete the nodemap files and update repository
requirements instead of processing all the revlogs.

After downgrade, we are left with unrequired docket and transaction files which
seems fine but can work on deleting them if someone feels we should.

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.Feb 15 2021, 5:28 AM

I think I'd rather we also delete the docket file(s) and transaction files if we can, but this would not be a blocker for this patch in particular to land.

mercurial/revlogutils/nodemap.py
134

nit: accessing rather than calling

mercurial/upgrade_utils/engine.py
481

That seems overly complicated since you already check len(upgrade_op.removes_actions) == 1 right before

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