Mercurial > hg
changeset 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 | 69d8fcf20014 |
children | 2b130e26c3a4 |
files | mercurial/commands.py tests/test-bundle-type.t tests/test-globalopts.t tests/test-help.t tests/test-hgweb-json.t |
diffstat | 5 files changed, 20 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Sat Apr 01 13:42:06 2017 -0700 +++ b/mercurial/commands.py Sat Apr 01 13:43:43 2017 -0700 @@ -1281,12 +1281,11 @@ ('a', 'all', None, _('bundle all changesets in the repository')), ('t', 'type', 'bzip2', _('bundle compression type to use'), _('TYPE')), ] + remoteopts, - _('[-f] [-t TYPE] [-a] [-r REV]... [--base REV]... FILE [DEST]')) + _('[-f] [-t BUNDLESPEC] [-a] [-r REV]... [--base REV]... FILE [DEST]')) def bundle(ui, repo, fname, dest=None, **opts): - """create a changegroup file - - Generate a changegroup file collecting changesets to be added - to a repository. + """create a bundle file + + Generate a bundle file containing data to be added to a repository. To create a bundle containing all changesets, use -a/--all (or --base null). Otherwise, hg assumes the destination will have @@ -1294,11 +1293,10 @@ will assume the repository has all the nodes in destination, or default-push/default if no destination is specified. - You can change bundle format with the -t/--type option. You can - specify a compression, a bundle version or both using a dash - (comp-version). The available compression methods are: none, bzip2, - and gzip (by default, bundles are compressed using bzip2). The - available formats are: v1, v2 (default to most suitable). + You can change bundle format with the -t/--type option. See + :hg:`help bundlespec` for documentation on this format. By default, + the most appropriate format is used and compression defaults to + bzip2. The bundle file can then be transferred using conventional means and applied to another repository with the unbundle or pull @@ -1323,7 +1321,7 @@ repo, bundletype, strict=False) except error.UnsupportedBundleSpecification as e: raise error.Abort(str(e), - hint=_("see 'hg help bundle' for supported " + hint=_("see 'hg help bundlespec' for supported " "values for --type")) # Packed bundles are a pseudo bundle format for now.
--- a/tests/test-bundle-type.t Sat Apr 01 13:42:06 2017 -0700 +++ b/tests/test-bundle-type.t Sat Apr 01 13:43:43 2017 -0700 @@ -40,12 +40,12 @@ $ hg -q pull ../b1 $ hg bundle -a -t unknown out.hg abort: unknown is not a recognized bundle specification - (see 'hg help bundle' for supported values for --type) + (see 'hg help bundlespec' for supported values for --type) [255] $ hg bundle -a -t unknown-v2 out.hg abort: unknown compression is not supported - (see 'hg help bundle' for supported values for --type) + (see 'hg help bundlespec' for supported values for --type) [255] $ cd .. @@ -193,7 +193,7 @@ $ hg -R tzstd bundle -a -t zstd-v1 zstd-v1 abort: compression engine zstd is not supported on v1 bundles - (see 'hg help bundle' for supported values for --type) + (see 'hg help bundlespec' for supported values for --type) [255] #else @@ -222,6 +222,6 @@ $ cd t1 $ hg bundle -a -t garbage ../bgarbage abort: garbage is not a recognized bundle specification - (see 'hg help bundle' for supported values for --type) + (see 'hg help bundlespec' for supported values for --type) [255] $ cd ..
--- a/tests/test-globalopts.t Sat Apr 01 13:42:06 2017 -0700 +++ b/tests/test-globalopts.t Sat Apr 01 13:43:43 2017 -0700 @@ -296,7 +296,7 @@ bookmarks create a new bookmark or list existing bookmarks branch set or show the current branch name branches list repository named branches - bundle create a changegroup file + bundle create a bundle file cat output the current or given revision of files clone make a copy of an existing repository commit commit the specified files or all outstanding changes @@ -380,7 +380,7 @@ bookmarks create a new bookmark or list existing bookmarks branch set or show the current branch name branches list repository named branches - bundle create a changegroup file + bundle create a bundle file cat output the current or given revision of files clone make a copy of an existing repository commit commit the specified files or all outstanding changes
--- a/tests/test-help.t Sat Apr 01 13:42:06 2017 -0700 +++ b/tests/test-help.t Sat Apr 01 13:43:43 2017 -0700 @@ -58,7 +58,7 @@ bookmarks create a new bookmark or list existing bookmarks branch set or show the current branch name branches list repository named branches - bundle create a changegroup file + bundle create a bundle file cat output the current or given revision of files clone make a copy of an existing repository commit commit the specified files or all outstanding changes @@ -136,7 +136,7 @@ bookmarks create a new bookmark or list existing bookmarks branch set or show the current branch name branches list repository named branches - bundle create a changegroup file + bundle create a bundle file cat output the current or given revision of files clone make a copy of an existing repository commit commit the specified files or all outstanding changes @@ -781,7 +781,7 @@ bookmarks create a new bookmark or list existing bookmarks branch set or show the current branch name branches list repository named branches - bundle create a changegroup file + bundle create a bundle file cat output the current or given revision of files clone make a copy of an existing repository commit commit the specified files or all outstanding changes @@ -2246,7 +2246,7 @@ bundle </a> </td><td> - create a changegroup file + create a bundle file </td></tr> <tr><td> <a href="/help/cat">