TFS——级联分支的可持续性
分支指南通常描述一个不朽的“主”分支,具有从主分支分支的功能,并合并回主分支,以及从主分支分支的版本,以及服务包、RTM 等所需的版本的进一步分支。关于主分支的指南是通常被简化为“主城区没有垃圾”。
我正在与一个定期(每月)连续发布的团队合作。对他们来说,似乎没有必要将工作返回到主分支。他们使用 TFS 2010 - 从图表上看,他们的分支结构如下所示:
在分支上进行每日构建;最终该分支投入生产。分支的任何修补程序都会直接应用于该分支,并且可以选择向前合并到任何未来运行中的分支。
该组织的分支策略被戏谑地描述为“级联分支反模式”。但考虑到这些分支发布到生产环境,然后(通常)有相当短的生存时间,真的是这样吗?
从长远来看,TFS 中级联分支的这种做法是否可持续。如果不是,限制是什么?何时(在多少个分支之后)可能达到限制?
是否有任何理由最终不“销毁”Main、R1、R2(等),或者是否存在阻止销毁和回收托管源代码存储库的 SQL Server 上的空间的“陷阱”?
Branching guidance usually describes an immortal "Main" branch, with features branched from Main, and merged back to Main, and Releases branched from Main, with further branches of a Release as necessary for Service Packs, RTMs, etc. The guidance regarding Main is often simplified to "no trash in Main."
I'm working with a group that releases regularly (as often as monthly) and serially. To them it seems unnecessary to ever return work to the Main branch. They use TFS 2010--diagramatically their branching structure looks like this:
Daily builds on a branch are made; eventually the branch goes to production. Any hotfixes to a branch are applied directly to that branch, and optionally merged forward to any future in-flight branches.
This group's branching strategy has been described perjoratively as the "Cascading Branches Antipattern." But is it really, given that these branches release to production, and then (usually) have a fairly short time to live?
Is this practice of cascading branches in TFS sustainable over the long term. If not, what are the limits, and when (after how many branches) might they be reached?
Is there any reason to NOT "destroy" Main, R1, R2 (etc.) eventually, or is there a "gotcha" that will prevent destroying and reclamation of space on the SQL server that is hosting the source code repository?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
级联分支可以工作。我也想不出任何技术原因为什么销毁非常旧的(最好是存档的)分支会影响较新的级联分支。以下是需要考虑的一些问题:
我相信 Jeff Levinson 做了一个演示,描述了分支演化从单个分支开始,然后是级联分支,然后是 Main+Release 和几个变体(同时描述每个分支的优缺点)。查看分支和合并实践 - Jeff Levinson(Teched 2010 视频)(或相关分支与合并 PPT)。
享受! -Zephan
Cascading branches can work. I also can't think of any technical reason why destroying very old (preferrably archived) branches would impact the newer cascaded branches. Here are some issues to consider:
I believe Jeff Levinson did a presentation that described branching evolution starting with single branch, then cascading branch, then Main+Release and a couple variations (while describing pros and cons of each). Check out Branching and Merging Practices - Jeff Levinson (Teched 2010 Video) (or related Branching & Merging PPT).
Enjoy! -Zephan