SVN-无法将分支合并回主干-大量树冲突 [英] SVN - unable to merge branch back into trunk - numerous tree-conflicts

查看:142
本文介绍了SVN-无法将分支合并回主干-大量树冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的场景-使用TortoiseSVN:

I have what I thought was a simple scenario - using TortoiseSVN:

1)我创建了一个应用程序的分支(B2)(用于实现图像精灵和JAWR).

1) I made a branch (B2) of an application (to work on implementing image sprites & JAWR).

2)测试与测试;开发在行李箱上正常进行.

2) Testing & development went on as normal on the trunk.

3)最近几天,我通过以下方式重新建立了分支机构:

3) I re-based the branch a couple of times over the last few days by:

3.1)将主干(按修订范围)合并到我的branch-b2工作副本中,解决了合并期间的冲突.

3.1) Merged trunk (by range of revisions) to my branch-b2 working copy, resolving conflicts during the merge.

3.2)(在测试了branch-b2之后),我提交了重新基于基础的branch-b2.

3.2) (after testing branch-b2), I commit the re-based branch-b2.

这一切都按我的预期进行.但是,将分支合并回主干的过程与我同在:

This all worked as I expected. But merging the branch back into the trunk is having its way with me:

4)在分支b2中提交所有更新之后;我确保我在trunk和branch-b2上进行了SVN更新.

4) After all updates committed in branch-b2; I make sure I do an SVN Update on trunk and branch-b2.

5)然后,我尝试将Branch-b2中的(修订范围)合并到主干中.但是,对于任何已经添加到主干,然后在我重新设置其基础时又添加到branch-b2的新文件,都会遇到树冲突.我不确定解决这些冲突的正确方法是什么.

5) Then, I try to merge (range of revisions) from branch-b2 into the trunk. However, for any new file that had been added to the trunk, and subsequently added to branch-b2 when I rebased it, I get a tree-conflict. I'm not sure what the proper way is to resolve these conflicts.

我所见过的最典型的建议是从主干中删除树冲突文件,然后合并分支;或删除整个中继,将分支文件复制过来,然后将其作为新版本提交到中继中.这些选项都不是一个好主意-第一个选项很痛苦,而且似乎都将丢失文件修订历史.

The most typical advice I've seen is to either delete the tree-conflict files from the trunk, then merge the branch over; or delete the entire trunk, copy the branch files over, and then commit them as a new version in the trunk. Neither of those options seems like a good idea- first one is a pain, and both seem like they would lose file revision histories.

我做错了什么,如何解决?

What'd I do wrong, and how do I fix it?

推荐答案

听起来像您在使用1.5之前的合并样式并尝试将分支重新整合到主干中.在这种情况下,您要做的是首先确保所有干线更改都已合并到分支中,然后要合并分支到"FROM干线",而不是将分支范围合并到指向该干线的工作副本中@HEAD TO branch @ HEAD",工作副本指向主干.本质上:

Sounds like you're using the pre-1.5 merge style and trying to reintegrate the branch into trunk. In that case, what you want to do is first ensure all the trunk changes have been merged in to the branch, and then instead of range-merging the branch to a working copy that points to the trunk, you want to merge "FROM trunk@HEAD TO branch@HEAD" with the working copy pointing to trunk. In essence:

给我所有使主干与分支相同所需的更改."

"Give me all the changes I'd need to make trunk identical to branch".

如果您已经将所有主干更改合并到分支中,则此方法有效,因为主干和分支之间的唯一区别就是分支中所做的更改.

This works if you've already merged all the trunk changes to the branch, because then the only difference between trunk and branch are the changes made in the branch.

有道理吗? :)

这篇关于SVN-无法将分支合并回主干-大量树冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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