##// END OF EJS Templates
commands: config option to control bundle compression level...
Gregory Szorc -
r30758:76104a48 default
parent child Browse files
Show More
@@ -1383,7 +1383,17 b' def bundle(ui, repo, fname, dest=None, *'
1383 assert cgversion == '02'
1383 assert cgversion == '02'
1384 bversion = 'HG20'
1384 bversion = 'HG20'
1385
1385
1386 bundle2.writebundle(ui, cg, fname, bversion, compression=bcompression)
1386 # TODO compression options should be derived from bundlespec parsing.
1387 # This is a temporary hack to allow adjusting bundle compression
1388 # level without a) formalizing the bundlespec changes to declare it
1389 # b) introducing a command flag.
1390 compopts = {}
1391 complevel = ui.configint('experimental', 'bundlecomplevel')
1392 if complevel is not None:
1393 compopts['level'] = complevel
1394
1395 bundle2.writebundle(ui, cg, fname, bversion, compression=bcompression,
1396 compopts=compopts)
1387
1397
1388 @command('cat',
1398 @command('cat',
1389 [('o', 'output', '',
1399 [('o', 'output', '',
@@ -110,6 +110,37 b' test bundle types'
110 c35a0f9217e65d1fdb90c936ffa7dbe679f83ddf
110 c35a0f9217e65d1fdb90c936ffa7dbe679f83ddf
111 gzip-v1
111 gzip-v1
112
112
113
114 Compression level can be adjusted for bundle2 bundles
115
116 $ hg init test-complevel
117 $ cd test-complevel
118
119 $ cat > file0 << EOF
120 > this is a file
121 > with some text
122 > and some more text
123 > and other content
124 > EOF
125 $ cat > file1 << EOF
126 > this is another file
127 > with some other content
128 > and repeated, repeated, repeated, repeated content
129 > EOF
130 $ hg -q commit -A -m initial
131
132 $ hg bundle -a -t gzip-v2 gzip-v2.hg
133 1 changesets found
134 $ f --size gzip-v2.hg
135 gzip-v2.hg: size=427
136
137 $ hg --config experimental.bundlecomplevel=1 bundle -a -t gzip-v2 gzip-v2-level1.hg
138 1 changesets found
139 $ f --size gzip-v2-level1.hg
140 gzip-v2-level1.hg: size=435
141
142 $ cd ..
143
113 #if zstd
144 #if zstd
114
145
115 $ for t in "zstd" "zstd-v2"; do
146 $ for t in "zstd" "zstd-v2"; do
General Comments 0
You need to be logged in to leave comments. Login now