分支策略的正确命令流程
所以我有一个 Mercurial 存储库,它是“有福的”存储库,我将在其中开放发布周期分支,例如 Release1、Release2 等。
当开发人员在发布周期上工作时,他们将拉取 Release1,然后在本地计算机分支上拉取针对 Bug1、Bug2 并修复它们。
开发人员需要执行什么命令序列才能正确关闭其 Bug 分支,将更改合并到 Release1 分支,以便当更改推送到服务器时,不会将有关 Bug1、Bug2 等的分支信息推送到服务器?
So I have a mercurial repository that is the "blessed" repository that I will have open release cycle branches, for example Release1, Release2 etc.
When a dev is working on a release cycle they will pull down Release1, then on their local machine branch for Bug1, Bug2 and fix those.
What command sequence needs to happen for the devs to correctly close their Bug branches, merge the changes into the Release1 branch so that when the changes are pushed to the server no branch information about Bug1, Bug2 etc will be pushed to the server?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您使用命名分支,则有关 bug1 的分支信息将始终推送到服务器。命名分支名称是其变更集的一部分,永远不会消失或更改。您可以通过使用
--close-branch
选项进行提交,使它们不显示在默认分支列表中,但它们仍然存在并且可列出。如果您想要一个分支名称不会转义的分支模型,Mercurial 提供了一些其他可能更适合您需求的分支选项:
http://stevelosh.com/blog/2009/08/a-guide-to-branching-in-mercurial/
如果有人建议使用'TransplantExtension' 来合并分支并隐藏分支信息,不要听——这是一个糟糕的主意。
If you're using named branches the branch information about bug1 will always be pushed to the server. Named branch names are parts of their changesets and never go away or get changed. You can cause them to not show up in default branch lists by using the
--close-branch
option to commit, but they're still there and listable.If you want a branching model where the branch names don't escape Mercurial provides some other branch options that may suit your needs better:
http://stevelosh.com/blog/2009/08/a-guide-to-branching-in-mercurial/
If someone suggests using the 'TransplantExtension' to merge the branches in and hide the branch information, don't listen -- it's a terrible idea.