Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 31794:54b1af732415
commands: update help for "bundle"
We now have a dedicated help topic to describe bundle specification
strings. Let's update `hg bundle`'s documentation to reflect its
existence.
While I was hear, I also tweaked some wording which I felt was out
of date and needed tweaking. Specifically, `hg bundle` no longer
just deals with "changegroup" data: it can also generate files
that have non-changegroup data.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 01 Apr 2017 13:43:43 -0700 |
parents | cda83a1bfb3a |
children | 2b130e26c3a4 |
comparison
equal
deleted
inserted
replaced
31793:69d8fcf20014 | 31794:54b1af732415 |
---|---|
1279 _('a base changeset assumed to be available at the destination'), | 1279 _('a base changeset assumed to be available at the destination'), |
1280 _('REV')), | 1280 _('REV')), |
1281 ('a', 'all', None, _('bundle all changesets in the repository')), | 1281 ('a', 'all', None, _('bundle all changesets in the repository')), |
1282 ('t', 'type', 'bzip2', _('bundle compression type to use'), _('TYPE')), | 1282 ('t', 'type', 'bzip2', _('bundle compression type to use'), _('TYPE')), |
1283 ] + remoteopts, | 1283 ] + remoteopts, |
1284 _('[-f] [-t TYPE] [-a] [-r REV]... [--base REV]... FILE [DEST]')) | 1284 _('[-f] [-t BUNDLESPEC] [-a] [-r REV]... [--base REV]... FILE [DEST]')) |
1285 def bundle(ui, repo, fname, dest=None, **opts): | 1285 def bundle(ui, repo, fname, dest=None, **opts): |
1286 """create a changegroup file | 1286 """create a bundle file |
1287 | 1287 |
1288 Generate a changegroup file collecting changesets to be added | 1288 Generate a bundle file containing data to be added to a repository. |
1289 to a repository. | |
1290 | 1289 |
1291 To create a bundle containing all changesets, use -a/--all | 1290 To create a bundle containing all changesets, use -a/--all |
1292 (or --base null). Otherwise, hg assumes the destination will have | 1291 (or --base null). Otherwise, hg assumes the destination will have |
1293 all the nodes you specify with --base parameters. Otherwise, hg | 1292 all the nodes you specify with --base parameters. Otherwise, hg |
1294 will assume the repository has all the nodes in destination, or | 1293 will assume the repository has all the nodes in destination, or |
1295 default-push/default if no destination is specified. | 1294 default-push/default if no destination is specified. |
1296 | 1295 |
1297 You can change bundle format with the -t/--type option. You can | 1296 You can change bundle format with the -t/--type option. See |
1298 specify a compression, a bundle version or both using a dash | 1297 :hg:`help bundlespec` for documentation on this format. By default, |
1299 (comp-version). The available compression methods are: none, bzip2, | 1298 the most appropriate format is used and compression defaults to |
1300 and gzip (by default, bundles are compressed using bzip2). The | 1299 bzip2. |
1301 available formats are: v1, v2 (default to most suitable). | |
1302 | 1300 |
1303 The bundle file can then be transferred using conventional means | 1301 The bundle file can then be transferred using conventional means |
1304 and applied to another repository with the unbundle or pull | 1302 and applied to another repository with the unbundle or pull |
1305 command. This is useful when direct push and pull are not | 1303 command. This is useful when direct push and pull are not |
1306 available or when exporting an entire repository is undesirable. | 1304 available or when exporting an entire repository is undesirable. |
1321 try: | 1319 try: |
1322 bcompression, cgversion, params = exchange.parsebundlespec( | 1320 bcompression, cgversion, params = exchange.parsebundlespec( |
1323 repo, bundletype, strict=False) | 1321 repo, bundletype, strict=False) |
1324 except error.UnsupportedBundleSpecification as e: | 1322 except error.UnsupportedBundleSpecification as e: |
1325 raise error.Abort(str(e), | 1323 raise error.Abort(str(e), |
1326 hint=_("see 'hg help bundle' for supported " | 1324 hint=_("see 'hg help bundlespec' for supported " |
1327 "values for --type")) | 1325 "values for --type")) |
1328 | 1326 |
1329 # Packed bundles are a pseudo bundle format for now. | 1327 # Packed bundles are a pseudo bundle format for now. |
1330 if cgversion == 's1': | 1328 if cgversion == 's1': |
1331 raise error.Abort(_('packed bundles cannot be produced by "hg bundle"'), | 1329 raise error.Abort(_('packed bundles cannot be produced by "hg bundle"'), |