Mercurial - 是否可以在同一个存储库中将主干的更改合并到分支?
Mercurial - 是否可以在同一存储库中将主干的更改合并到分支?
如果可以,TortoiseHg 可以吗?
Mercurial - Is it possible to merge changes from the trunk to a branch, within the same repository?
If yes, is it possible with TortoiseHg?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以做两件事:合并或移植。这些答案假设是命令行,您可能必须在乌龟中搜索菜单才能找到类似的功能。
您可以将一个分支的所有更改合并到另一个分支。其过程是:
这会将默认的所有提交带入您的分支,但反之则不然。稍后,您可以通过执行相反的操作来重新集成默认分支。
如果您想引入在另一个分支中提交的一个或多个特定提交,您可以使用“移植”来实现,这是一个善变的扩展。
这些是您可以用来使用移植的命令:
There are two things you can do, merge or transplant. These answers assume the command line, you may have to search through your menus in tortoise to find similar functionality.
You can merge all the changes from one branch to another. The procedure for this is:
This will bring all commits from default into your branch, but not the other way around. Later you can reintegrate your branch with default by doing the opposite
If you want to bring in one or more specific commits that were committed in another branch, you can do that with 'transplant', which is a mercurial extension.
These are the commands you can use to use transplant:
正如@Jerub 所说,您可以使用合并和移植将更改集从一个分支获取到另一个分支。使用 TortoiseHg,您可以通过打开“存储库资源管理器”进行合并,然后选择要合并的第一个修订版本,然后右键单击要合并的第二个修订版本。选择“合并...”菜单项进行合并。
As @Jerub said, you can use merge and transplant to get change sets from one branch to another. With TortoiseHg you can do a merge by opening the "repository explorer", then select the first revision to merge, and afterwards right click on the second revision to merge. Chose the "Merge with..." menu item to do the merge.