This is an archive of the discontinued Mercurial Phabricator instance.

treemanifest: add command for backfilling manifests revlog
ClosedPublic

Authored by durham on Nov 20 2017, 11:28 AM.
Tags
None
Subscribers

Details

Summary

Previously, once you transitioned to treeonly mode you had no way of switching
back to hybrid mode. This patch adds a hg backfillmanifestrevlog command to
refill a manifest revlog with any bits that are missing.

Diff Detail

Repository
rFBHGX Facebook Mercurial Extensions
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

durham created this revision.Nov 20 2017, 11:28 AM
Herald added a reviewer: Restricted Project. · View Herald TranscriptNov 20 2017, 11:28 AM
durham updated this revision to Diff 3647.Nov 20 2017, 11:41 AM
quark accepted this revision.Nov 21 2017, 3:21 AM
quark added a subscriber: quark.
quark added inline comments.
treemanifest/__init__.py
682

This revset is expensive (O(len(changelog)) in Python code path). Maybe use

(heads(parents(roots(draft()))) + head()) & public()

instead.

683–684

More efficient if cl.node is inlined as a variable.

This revision is now accepted and ready to land.Nov 21 2017, 3:21 AM
durham added inline comments.Nov 21 2017, 9:59 AM
treemanifest/__init__.py
682

This won't get the same results though right? If some draft commits branch off some arbitrary spot in the history of master, that spot will be in the result, despite not being a head

This revision was automatically updated to reflect the committed changes.