1202 bundlespec = exchange.parsebundlespec(repo, bundletype, strict=False) |
1202 bundlespec = exchange.parsebundlespec(repo, bundletype, strict=False) |
1203 except error.UnsupportedBundleSpecification as e: |
1203 except error.UnsupportedBundleSpecification as e: |
1204 raise error.Abort(pycompat.bytestr(e), |
1204 raise error.Abort(pycompat.bytestr(e), |
1205 hint=_("see 'hg help bundlespec' for supported " |
1205 hint=_("see 'hg help bundlespec' for supported " |
1206 "values for --type")) |
1206 "values for --type")) |
1207 cgversion = bundlespec.version |
1207 cgversion = bundlespec.contentopts["cg.version"] |
1208 |
1208 |
1209 # Packed bundles are a pseudo bundle format for now. |
1209 # Packed bundles are a pseudo bundle format for now. |
1210 if cgversion == 's1': |
1210 if cgversion == 's1': |
1211 raise error.Abort(_('packed bundles cannot be produced by "hg bundle"'), |
1211 raise error.Abort(_('packed bundles cannot be produced by "hg bundle"'), |
1212 hint=_("use 'hg debugcreatestreamclonebundle'")) |
1212 hint=_("use 'hg debugcreatestreamclonebundle'")) |
1265 compopts = {} |
1265 compopts = {} |
1266 complevel = ui.configint('experimental', 'bundlecomplevel') |
1266 complevel = ui.configint('experimental', 'bundlecomplevel') |
1267 if complevel is not None: |
1267 if complevel is not None: |
1268 compopts['level'] = complevel |
1268 compopts['level'] = complevel |
1269 |
1269 |
1270 |
1270 # Allow overriding the bundling of obsmarker in phases through |
1271 contentopts = {'cg.version': cgversion, 'changegroup': True} |
1271 # configuration while we don't have a bundle version that include them |
1272 if repo.ui.configbool('experimental', 'evolution.bundle-obsmarker'): |
1272 if repo.ui.configbool('experimental', 'evolution.bundle-obsmarker'): |
1273 contentopts['obsolescence'] = True |
1273 bundlespec.contentopts['obsolescence'] = True |
1274 if repo.ui.configbool('experimental', 'bundle-phases'): |
1274 if repo.ui.configbool('experimental', 'bundle-phases'): |
1275 contentopts['phases'] = True |
1275 bundlespec.contentopts['phases'] = True |
|
1276 |
1276 bundle2.writenewbundle(ui, repo, 'bundle', fname, bversion, outgoing, |
1277 bundle2.writenewbundle(ui, repo, 'bundle', fname, bversion, outgoing, |
1277 contentopts, compression=bcompression, |
1278 bundlespec.contentopts, compression=bcompression, |
1278 compopts=compopts) |
1279 compopts=compopts) |
1279 |
1280 |
1280 @command('cat', |
1281 @command('cat', |
1281 [('o', 'output', '', |
1282 [('o', 'output', '', |
1282 _('print output to file with formatted name'), _('FORMAT')), |
1283 _('print output to file with formatted name'), _('FORMAT')), |