尝试从分支合并回主分支并关闭 Mercurial 中的分支

发布于 2024-08-21 01:19:48 字数 274 浏览 4 评论 0原文

我有一个命名分支(同一存储库),它是为了尖峰而创建的。我现在决定将分支中创建的所有变更集移回主分支(默认),然后关闭分支。

我尝试了很多不同的方法,包括这篇文章中概述的内容(如何在 Mercurial 中重复合并分支),但我就是无法让它工作:(

任何人都可以提供任何指示吗?

谢谢。

I've got a named branch (same repository) that was created in order to to spike something. I've now decided that I want to move all the changesets created in the branch back into the main (default) and then close the branch.

I've tried a number of different things, including what was outlined in this post (How to repeatedly merge branches in Mercurial) but I just can't get it working :(

Can anyone provide any pointers?

Thanks.

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

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

发布评论

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

评论(2

近箐 2024-08-28 01:19:48

将功能分支合并到默认

hg up default
hg merge feature-branch-name
hg ci -m 'merged feature-branch-name into default'

分支 关闭您不想再使用的分支

hg up feature-branch-name
hg ci --close-branch -m 'close feature-branch-name branch'
hg up default

请注意,关闭命令不会对存储库历史记录产生任何破坏性影响

它将您的分支标记为已关闭,以便它不会出现在 中hgbranchhghead 命令输出

Merge the feature branch into default

hg up default
hg merge feature-branch-name
hg ci -m 'merged feature-branch-name into default'

Close the branch you don't want to use anymore

hg up feature-branch-name
hg ci --close-branch -m 'close feature-branch-name branch'
hg up default

Note that the close command doesn't have any disruptive effects on the repository history

It flags your branch as closed so that it won't appear in hg branches and hg heads commands output

狼性发作 2024-08-28 01:19:48

我已经设法使用问题中提到的链接解决了我的问题。链接中描述的步骤实际上合并了我的更改,但我没有意识到,因为我在 TortoiseHg UI 中查看并且看不到那里的更改。当我通过命令行执行 hg Outgoing 时,合并似乎工作正常。

I've managed to solve my problem using the link I mentioned in my question. The steps described in the link had actually merged my changes across however I didn't realise as I was looking in the TortoiseHg UI and couldn't see the changes there. When I performed hg outgoing via the command line it appears that the merge had worked correctly.

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