简体   繁体   English

TortoiseSVN / Subversion-分支到主干的定期合并

[英]TortoiseSVN/Subversion - Periodic merging of branch to trunk

Our company has recently switched version control systems to SVN using TortoiseSVN as our client to facilitate use of the agile development method. 我们公司最近已使用TortoiseSVN作为客户将版本控制系统切换为SVN,以促进使用敏捷开发方法。 Our SVN repository has multiple branches from the trunk, one for each sprint. 我们的SVN信息库在主干中有多个分支,每个sprint一个。 We usually do the "keep branch up to date with trunk and then reintegrate branch" method. 我们通常执行“使分支保持最新状态,然后重新整合分支”方法。 However, sometimes changes in a branch need to be ported to the trunk, or to other branches! 但是,有时分支中的更改需要移植到主干或其他分支中! (like bug fixes). (如错误修复)。 We have a bugfixes branch that is constantly in development (and I would like to keep it a branch if possible, so the trunk can stay "pure"). 我们有一个不断发展的bugfixes分支(如果可能,我想将其保留为一个分支,以便使主干可以保持“纯净”状态)。

If I merge a range of revisions from branch to trunk periodically and then re-integrate branch to trunk when our set of bugfixes is done, will this work? 如果我定期合并从分支到主干的一系列修订版本,然后在完成我们的一组错误修正后重新集成分支到主干,这可以工作吗? I don't want to double merge things. 我不想双重合并。 Would it be better to never do reintegration merges instead and just keep doing range of revisions? 最好不要再进行重新整合合并,而只保留修订范围呢? We are using SVN 1.6. 我们正在使用SVN 1.6。

if I merge a range of revisions from branch to trunk periodically and then re-integrate branch to trunk when our set of bugfixes is done, will this work? 如果我定期合并从分支到主干的一系列修订,然后在完成我们的一组错误修复后重新集成分支到主干,这可以工作吗?

Yes, that it will work. 是的,它将起作用。

I don't want to double merge things. 我不想双重合并。

Since you are using Subversion 1.6, as long the svn:mergeinfo property is not tampered with, Subversion will keep track of what changes have already been merged and merge only those changes that have not. 由于您使用的是Subversion 1.6,因此只要不篡改svn:mergeinfo属性 ,Subversion就会跟踪已合并的更改,仅合并那些尚未合并的更改。

Would it be better to never do reintegration merges instead and just keep doing range of revisions? 最好不要再进行重新整合合并,而只保留修订范围呢?

You can do either one. 您可以任一个。 But I would recommend doing reintegration merges unless you are moving patches or hot-fixes into trunk or another branch. 但是我建议您进行重新集成合并,除非您将补丁程序或修补程序移动到中继或另一个分支中。

One note about patches or hot-fixes when merge from branch to branch: Be careful if the hot-fix or patch has new objects (files and/or directories). 关于从一个分支到另一个分支合并时修补程序或修补程序的一个注意事项:请注意该修补程序或修补程序是否具有新对象(文件和/或目录)。 Sometimes those can cause tree-conflicts which can be painful to merge or reintegrate after a branch is released, moved into trunk and the other branch is then updated from trunk. 有时,这些可能会导致树冲突,在释放分支,移入主干并从主干更新另一个分支之后,合并或重新集成可能会很痛苦。 Subversion 1.6.x and related clients handle this during the merge process, but older clients do not. Subversion 1.6.x和相关客户端在合并过程中会处理此问题,而较旧的客户端则不会。

Two questions: 两个问题:

  • Are you running multiple unrelated sprints in a single release cycle? 您是否在一个发布周期中运行多个不相关的Sprint?

  • Do you tag releases to last released production versions on completion of every release cycle? 在每个发行周期结束时,您是否将发行标记为最新发行的生产版本?

If you answered yes to the first question, it makes sense for multiple branches and periodic merges from branches to trunk. 如果您对第一个问题的回答是“是”,则对于多个分支以及从分支到主干的定期合并都是有意义的。 If you tag releases periodically or every release, it might make it redundant to run branches at all and have trunk as the "bleeding edge" development version, including bugfixes. 如果您定期标记发行版或每个发行版,则可能根本多余以完全运行分支并将主干作为“出血边缘”开发版本,包括错误修复。 YMMV. YMMV。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM