# HG changeset patch # User Gregory Szorc # Date 1491079423 25200 # Node ID 54b1af7324152ec795e40cedfaa590bfbc55e91f # Parent 69d8fcf200147e263678610024dd68d008859864 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. diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -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. diff --git a/tests/test-bundle-type.t b/tests/test-bundle-type.t --- a/tests/test-bundle-type.t +++ b/tests/test-bundle-type.t @@ -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 .. diff --git a/tests/test-globalopts.t b/tests/test-globalopts.t --- a/tests/test-globalopts.t +++ b/tests/test-globalopts.t @@ -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 diff --git a/tests/test-help.t b/tests/test-help.t --- a/tests/test-help.t +++ b/tests/test-help.t @@ -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 - create a changegroup file + create a bundle file diff --git a/tests/test-hgweb-json.t b/tests/test-hgweb-json.t --- a/tests/test-hgweb-json.t +++ b/tests/test-hgweb-json.t @@ -1443,7 +1443,7 @@ "topic": "branches" }, { - "summary": "create a changegroup file", + "summary": "create a bundle file", "topic": "bundle" }, {