1382 bversion = 'HG20' |
1382 bversion = 'HG20' |
1383 else: |
1383 else: |
1384 raise error.ProgrammingError( |
1384 raise error.ProgrammingError( |
1385 'bundle: unexpected changegroup version %s' % cgversion) |
1385 'bundle: unexpected changegroup version %s' % cgversion) |
1386 |
1386 |
1387 cg = changegroup.getchangegroup(repo, 'bundle', outgoing, version=cgversion) |
|
1388 |
|
1389 # TODO compression options should be derived from bundlespec parsing. |
1387 # TODO compression options should be derived from bundlespec parsing. |
1390 # This is a temporary hack to allow adjusting bundle compression |
1388 # This is a temporary hack to allow adjusting bundle compression |
1391 # level without a) formalizing the bundlespec changes to declare it |
1389 # level without a) formalizing the bundlespec changes to declare it |
1392 # b) introducing a command flag. |
1390 # b) introducing a command flag. |
1393 compopts = {} |
1391 compopts = {} |
1394 complevel = ui.configint('experimental', 'bundlecomplevel') |
1392 complevel = ui.configint('experimental', 'bundlecomplevel') |
1395 if complevel is not None: |
1393 if complevel is not None: |
1396 compopts['level'] = complevel |
1394 compopts['level'] = complevel |
|
1395 |
|
1396 cg = changegroup.getchangegroup(repo, 'bundle', outgoing, version=cgversion) |
1397 |
1397 |
1398 bundle2.writebundle(ui, cg, fname, bversion, compression=bcompression, |
1398 bundle2.writebundle(ui, cg, fname, bversion, compression=bcompression, |
1399 compopts=compopts) |
1399 compopts=compopts) |
1400 |
1400 |
1401 @command('cat', |
1401 @command('cat', |