git 包的 hg 命令

发布于 2024-08-29 10:23:31 字数 70 浏览 7 评论 0原文

在 git 中,有一个命令“git bundle”,它将 git 存储库捆绑到 1 个大文件中。 是否有与“hg”等效的命令?

In git, there is a command 'git bundle' which bundles a git repository into 1 big file.
Is there the equivalent command for 'hg'?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

终难遇 2024-09-05 10:23:31

Hg 支持相同的命令。这是它的帮助:

U:\>hg help bundle
hg bundle [-f] [-t TYPE] [-a] [-r REV]... [--base REV]... FILE [DEST]

create a changegroup file

    Generate a compressed changegroup file collecting changesets not known to
    be in another repository.

    If you omit the destination repository, then hg assumes the destination
    will have all the nodes you specify with --base parameters. To create a
    bundle containing all changesets, use -a/--all (or --base null).

    You can change compression method with the -t/--type option. The available
    compression methods are: none, bzip2, and gzip (by default, bundles are
    compressed using bzip2).

    The bundle file can then be transferred using conventional means and
    applied to another repository with the unbundle or pull command. This is
    useful when direct push and pull are not available or when exporting an
    entire repository is undesirable.

    Applying bundles preserves all changeset contents including permissions,
    copy/rename information, and revision history.

options:

 -f --force      run even when the destination is unrelated
 -r --rev        a changeset intended to be added to the destination
 -b --branch     a specific branch you would like to bundle
    --base       a base changeset assumed to be available at the destination
 -a --all        bundle all changesets in the repository
 -t --type       bundle compression type to use (default: bzip2)
 -e --ssh        specify ssh command to use
    --remotecmd  specify hg command to run on the remote side

反向操作的命令是 hg unbundle。

Hg supports the same command. Here's the help for it:

U:\>hg help bundle
hg bundle [-f] [-t TYPE] [-a] [-r REV]... [--base REV]... FILE [DEST]

create a changegroup file

    Generate a compressed changegroup file collecting changesets not known to
    be in another repository.

    If you omit the destination repository, then hg assumes the destination
    will have all the nodes you specify with --base parameters. To create a
    bundle containing all changesets, use -a/--all (or --base null).

    You can change compression method with the -t/--type option. The available
    compression methods are: none, bzip2, and gzip (by default, bundles are
    compressed using bzip2).

    The bundle file can then be transferred using conventional means and
    applied to another repository with the unbundle or pull command. This is
    useful when direct push and pull are not available or when exporting an
    entire repository is undesirable.

    Applying bundles preserves all changeset contents including permissions,
    copy/rename information, and revision history.

options:

 -f --force      run even when the destination is unrelated
 -r --rev        a changeset intended to be added to the destination
 -b --branch     a specific branch you would like to bundle
    --base       a base changeset assumed to be available at the destination
 -a --all        bundle all changesets in the repository
 -t --type       bundle compression type to use (default: bzip2)
 -e --ssh        specify ssh command to use
    --remotecmd  specify hg command to run on the remote side

The command for the reverse operation is hg unbundle.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文