This is an archive of the discontinued Mercurial Phabricator instance.

changegroup: consolidate tree manifests sending into cg1packer
ClosedPublic

Authored by indygreg on Aug 3 2018, 5:04 PM.

Details

Summary

Previously, we overrode a method to control how manifests were
serialized. This method was redefined on cg3packer to send tree
manifests.

This commit moves the tree manifests sending variation to cg1packer
and teaches the cgpacker constructor to control which version to
use.

After these changes, cg3packer was empty. So it has been removed.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

indygreg created this revision.Aug 3 2018, 5:04 PM
This revision was automatically updated to reflect the committed changes.
martinvonz added inline comments.
mercurial/changegroup.py
674

Note that this also works for flat manifests (IIRC). You should be able always use this version, as long as you remove the assertion. You can perhaps move the assertion 3 lines down into the if dir: block.