Subversion 分支/主干最佳实践 - 保持分支最新? [英] Subversion Branch/Trunk Best Practice - keeping Branch Up-to-Date?

查看:36
本文介绍了Subversion 分支/主干最佳实践 - 保持分支最新?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的开发团队使用 subversion 已经有一段时间了.主干和分支的管理方式如下:

My development team has worked with subversion for quite some time. The way that manage the trunk and branches is as follows:

  • 我们(几乎)总是从后备箱中释放

  • We (almost) always release from the trunk

每个版本都有自己的分支.

Each release gets its own branch.

当一个版本准备好进行 QA 时,我们将分支合并回主干并为下一个版本创建一个新分支.

When a release is ready for QA, we merge the branch back into the trunk and create a new branch for the next release.

开发人员在主干或分支上工作,但没有特定于开发人员的分支.

Developers work off of either the trunk or the branch, but there are no developer-specific branches.

最近,我们遇到了一些噩梦般的合并会话,部分原因是应用程序发生了一些重大变化.这些并不总是顺利进行,有时会在 QA 期间弹出问题,其中 subversion 没有完全正确合并.

Lately, we have had some nightmare merging sessions, in part due to some major changes to the application. These don't always go smoothly and issues sometimes pop-up during QA where subversion did not merge quite right.

一种解决方案可能是定期(例如每周)将主干更改合并到发布分支中,以确保最新的主干更改在分支中.然后可以更接近实时地解决冲突.

One solution might be to merge trunk changes into the release branch on a regular basis, say weekly, to ensure that the most up-to-date trunk changes are in the branch. Conflicts can then be fixed in closer to real-time.

您对这个问题的体验如何?有标准的最佳实践吗?另外,您是否有一种很好的方法来跟踪哪些修订已合并到分支中(subversion 中的体面注释可能会处理该问题).

What is your experience with this issue? Is there a standard best practice? Also, do you have a good way of keeping track of which revisions have been merged into the branch (decent comments in subversion could probably handle that).

推荐答案

首先,在管理代码分支和发布时,我认为没有一种万能的解决方案.但从我的角度谈谈你的一些观点:

Firstly, I don't think there's a one-size fits all solution when it comes to managing code branches and releases. But to touch on a few of your points from my perspective:

  • 是的,我会更频繁地将主干中的更改合并到发布分支中.与大型集成相比,较小的块总是更易于管理.当然,这意味着您正在使用最新最稳定的代码.

  • Yes, I would merge changes from trunk into the release branch more often. Smaller chunks are always going to be more manageable than one large integration. And of course this means you're working against the latest most stable code.

主动教导人们如何很好地融合.进行更改的开发人员应该进行(或密切参与)合并.了解您正在服用什么以及完成后应该是什么样子.我经常看到人们在不真正知道他们在做什么以及他们期望结果是什么的情况下运行集成.

Proactively teach people how to merge well. The developer who made the change should be doing (or be closely involved with) the merge. Understand what it is you are taking and what it should look like when it is finished. I too often see people run a integration without really knowing what they are doing and what they are expecting as the result.

也许您想要一个不是主干的集成分支.这可以每天进行测试,并在问题发生并破坏主干并吓到每个人之前在这里发现任何问题.

Perhaps you want to have an integration branch that isn't trunk. This can be tested daily and any issues caught here before they go and break trunk and scare everybody.

这篇关于Subversion 分支/主干最佳实践 - 保持分支最新?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆