mercurial/commands.py
changeset 30758 76104a4899ad
parent 30721 4ab19763d71c
child 30762 35b516f800e0
--- a/mercurial/commands.py	Tue Jan 10 11:19:37 2017 -0800
+++ b/mercurial/commands.py	Tue Jan 10 11:20:32 2017 -0800
@@ -1383,7 +1383,17 @@
         assert cgversion == '02'
         bversion = 'HG20'
 
-    bundle2.writebundle(ui, cg, fname, bversion, compression=bcompression)
+    # TODO compression options should be derived from bundlespec parsing.
+    # This is a temporary hack to allow adjusting bundle compression
+    # level without a) formalizing the bundlespec changes to declare it
+    # b) introducing a command flag.
+    compopts = {}
+    complevel = ui.configint('experimental', 'bundlecomplevel')
+    if complevel is not None:
+        compopts['level'] = complevel
+
+    bundle2.writebundle(ui, cg, fname, bversion, compression=bcompression,
+                        compopts=compopts)
 
 @command('cat',
     [('o', 'output', '',