什么 hg 命令仅显示传入的头?

发布于 2024-12-20 22:35:50 字数 249 浏览 3 评论 0原文

我有两个存储库,我将它们称为 RepoARepoBRepoA 有许多其他版本所缺少的变更集。 RepoA 中有很多头,而 RepoB 中只有几个头。我想要一个命令,它只告诉我在 hg pull 后将添加到 RepoB 的头。

我需要这个,因为我想留下 RepoA 中的一些头。

I have a two repositories, I'll call them RepoA and RepoB. RepoA has many changesets that the other is lacking. There are many heads in RepoA and only a few in RepoB. I'd like a command that tells me only the heads that will be added to RepoB after an hg pull.

I need this because I want to leave some of the heads in RepoA behind.

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

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

发布评论

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

评论(2

伴我心暖 2024-12-27 22:35:50

从您想要拉取的存储库中,尝试以下命令:

hg log -r "outgoing('path\to\your\repo') and head()"

如果您无法在要直接拉取的存储库上运行该命令,则将其克隆到本地并在克隆上运行。

head() 被定义为“Changeset 是一个命名分支头”,所以如果您感兴趣的头不是命名分支,我不确定这是否可行。

查看 hg help revset 了解更多信息。

From the repo that you want to pull, try this command:

hg log -r "outgoing('path\to\your\repo') and head()"

If you can't run that on the repo you want to pull from directly, then clone it local and run it on the clone.

head() is defined as "Changeset is a named branch head", so if the heads you are interested in aren't named branches, I'm not sure if this will work.

Check out hg help revset for more info.

月寒剑心 2024-12-27 22:35:50

命令hg传入有一个针对特定分支的-b参数。也许这就是您在这种情况下所需要的。

The command hg incoming has a -b parameter for a specific branch. Perhaps that's what you need in this case.

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