Mercurial - 使用克隆分支或使用命名分支进行分支
目前,我正在使用 CVS 来跟踪我的 SourceForge 项目。我有以下要求。
- 我需要保持稳定的主干。每当用户报告严重错误时,我可能会立即修复,并在几天内发布。
- 我需要执行广泛的新功能增强,断断续续地进行大量代码重构。这可能需要几周到几个月的时间。因此,我通常做的是,我将在一个分支(或者如果有更多功能,则更多分支)内执行新功能增强和大量代码重构。只有经过足够的测试后,我才会将它们合并回稳定的Trunk。
大多数时候我的网络连接都很差。最近,我计划迁移到分布式源代码控制 - Mercurial ,以便有时可以离线工作。
我读了下面的文章。我相信我可以使用以下方式在CVS的分支下保留我以前的工作流程。
- 克隆
- < a href="http://stevelosh.com/blog/2009/08/a-guide-to-branching-in-mercurial/#branching-with-named-branches" rel="nofollow">命名分支
但是,从最终用户的角度来看,我看不出有什么区别。我可以知道你们通常应用哪种神话吗?为什么?
Currently, I am using CVS to keep track of my SourceForge project. I has the following requirements.
- I need to maintain a stable Trunk. Whenever there is a critical bug being reported by users, I may fix immediately, and release it within a few days.
- I need to perform extensive new features enhancement, huge code refactoring on and off. This may take several weeks to several months. Hence, what I usually do, is I will perform the new features enhancement and huge code refactoring within a branch (Or more branches if there are more features). Only after enough testing, I will merge them back to stable Trunk.
I am behind a poor internet connection most of the time. Recently, I am planning to migrate to a distributed source control - Mercurial , so that I can work offline sometimes.
I read the following article. I believe I can use the following ways to preserve my previous workflow under CVS's branching.
However, I cannot see any difference from end user point of view. May I know which mythology you guys usually apply? and why?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您会注意到,对于命名分支,您在贡献之前首先创建分支。
使用克隆,您只需开始为克隆存储库做出贡献,然后再考虑它是否值得包含/合并到主存储库。
总结一下:
请参阅以下关于 SO 的讨论,它提供了有关克隆、命名分支以及何时使用克隆的良好信息。
You will notice that with named branches, you create the branch first before you contribute.
With clones, you just start contributing to cloned repository before you even think if it deserves to be included / merged to main repository.
To sum it up:
See the following discussion on SO and it provides good information on clones , named branches and when to use which.