Subversion 功能分支需要从另一个功能分支进行更改 [英] Subversion feature branch requires changes from another feature branch

查看:27
本文介绍了Subversion 功能分支需要从另一个功能分支进行更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个功能分支:featureA 和 featureB.

I have two feature branches: featureA and featureB.

FeatureA 已完成,但未合并到主干中,因为它未经测试,我们还没有准备好对其进行测试.

FeatureA is complete, but not merged into trunk because it's untested and we're not ready to test it yet.

我正在研究 featureB,并且意识到需要在 featureA 中实施更改才能继续.

I'm working on featureB, and have realised that a change implemented in featureA is required for me to continue.

最好的方法是什么?我想我有几个选择:

What's the best approach? I think I have a couple of options:

将 featureA 合并到 featureB 分支(或者可能只是特定的修订,如果我小心地获得我想要的所有修订),然后恢复除我需要的更改之外的所有更改.

Merge featureA to featureB branch (or maybe just specific revisions if I'm careful to get all the ones I want), then revert all but the changes I need.

重新实现 featureB 中的变化(这次不是太复杂),整理好 featureA 和 featureB 合并到同一个地方时的冲突.

Re-implement the changes in featureB (they're not too complex this time) and sort out the conflicts when featureA and featureB are merged into the same place.

无论哪种方式,功能都将合并到准备测试和部署的候选发布分支中.一旦该 RC 分支被确认通过测试,它将一次性合并到主干中.

Either way, the features will be merged into a release candidate branch ready for testing and deployment. Once that RC branch is confirmed as tested, it'll be merged into trunk in one go.

推荐答案

还有第三种选择:

您可以挑选想要合并的内容,然后合并.执行从 featureA 到 featureB 的合并,但只合并您感兴趣的修订.然后可以选择修复任何剩余的问题.

You can cherry-pick what you want to merge, and merge just that. Perform a merge from featureA to featureB, but only merge the revisions that you are interested in. Then optionally fix any remaining problems.

在 Eclipse 中,例如这可以很方便地完成,因为合并对话框将让您选择要合并的修订版(或范围).只需对您需要的所有修订范围重复此操作即可.

In Eclipse e.g. this can be done quite conveniently, because the merge dialog will let you select which revision (or which range) you want to merge. Just repeat that for all the revision ranges you need.

这篇关于Subversion 功能分支需要从另一个功能分支进行更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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