This is an archive of the discontinued Mercurial Phabricator instance.

bundle: allow bundlerepo to support alternative manifest implementations
ClosedPublic

Authored by durham on Nov 7 2017, 1:19 PM.

Details

Summary

With our treemanifest logic, the manifests are no longer transported as part of
the changegroup and are no longer stored in a revlog. This means the
self.manifestlog line in bundlerepo.filestart no longer calls
_constructmanifest, and therefore does not consume the manifest portion of the
changegroup, which means filestart is not populated and we result in an infinite
loop.

The fix is to make filestart aware that self.manifestlog might not consume the
changegroup part, and consume it manually if necessary.

There's currently no way to test this in core, but our treemanifest extension
has tests to cover this.

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

durham created this revision.Nov 7 2017, 1:19 PM
indygreg accepted this revision.Nov 10 2017, 12:35 AM
indygreg added a subscriber: indygreg.

bundlerepo is a pile of hacks and this seems par for the course.

FWIW, I've been looking at rewriting bundle2's I/O layer in order to address issue 5691. If you anticipate making significant changes to bundlerepo or bundle2 in the near future, please let me know so we don't step on each other's toes.

This revision is now accepted and ready to land.Nov 10 2017, 12:35 AM
This revision was automatically updated to reflect the committed changes.