This is an archive of the discontinued Mercurial Phabricator instance.

bundle: introduce per-engine compression level
ClosedPublic

Authored by joerg.sonnenberger on Apr 16 2018, 9:08 PM.

Details

Summary

If experimental.bundlecomplevel.$engine is set, prefer it over the
generic experimental.bundlecomplevel. Given that compression levels have
widely different meanings across engines, this allows much saner
configuration.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

I'm -0 on this because it's yet more experimental code. Since this experimental option was added, the code for parsing bundle specs has been drastically improved. I would rather we declare a bundlespec parameter to define the compression level (e.g. `;complevel=4`) and have the bundler consume that. The code touched in commands.py already has access to the parsed bundlespec.

But if we don't want to do that so close to freeze, I'm fine adding yet more experimental config options.

I don't really disagree that the existing option naming is a bit stupid. There are useful points for including the compression level as part of the bundle spec, but I don't think that replaces the need for a config option for sane defaults.
As I said on IRC, a consistent approach for the three places where compression is used would be useful:

  • standalone "hg bundle" operations
  • wire compression
  • reflog compression

We currently don't allow tuning for the latter two, even though trade-offs between (write) performance and space make a lot of sense. As such, having a uniform mechanism for specifying the compression level sounds like a good idea.

indygreg accepted this revision.Apr 17 2018, 4:45 PM

I'm going to queue this because it is a useful feature. But I would strongly prefer we formalize things early in the 3.7 cycle. This functionality is too important to only live behind experimental flags.

This revision is now accepted and ready to land.Apr 17 2018, 4:45 PM
This revision was automatically updated to reflect the committed changes.