如何“解决” SVN分支/树冲突? [英] How to 'fix' a SVN branch/tree conflict?
问题描述
我接管了一个软件项目,并决定使用Tortoise SVN将所有内容放在SVN下(在 Assembla 上)。中继线位于ROOT下。因此,主干包含了整个应用程序(我标记为1.0)。对于我的第一个重要功能,我创建了一个名为 dev的功能分支。
I took over a software project and decided to put everything under SVN (on Assembla) using Tortoise SVN. The trunk is under ROOT. So the trunk contained the whole application (which I tagged 1.0). For my first big feature I created a feature branch named "dev".
我可以毫无问题地将主干分支中的更改合并到dev分支中(因为我正在做一些小错误修复)。功能完成后,我将合并回到主干分支。到目前为止,一切都在进行。 ROOT下的新代码正确显示了新功能。但是后来我做了一次提交(合并的结果),现在每次我尝试从根目录或dev分支进行合并时,SVN都会抱怨许多文件上的树冲突。即使是合并后我没有碰过的文件。我试图解决冲突,但没有成功。
I could merge changes in the trunk branch into the dev branch without problem (as I was doing small bug fixes). Once my feature was complete, I did a merge back into the trunk branch. Everything was working fin up to this point. The new code under ROOT showed the new feature properly. But then I did a commit (of the result of the merge) and now every time I try to do a merge from the root or from the dev branch, SVN complains about "tree conflict" on many files. Even files that I did not touch since the merge. I tried to resolve the conflicts, without success.
我是唯一的开发人员,所以我并不真正在乎存储库的重大更改。但是我仍然希望保留所有文件的历史记录。
I'm the only developer, so I don't really care about major changes to the repository. But I still want to keep the history of all files if it's possible.
什么是解决此问题的最佳方法?有什么办法可以将ROOT中继中的所有最新文件标记为文件的确定版本?
What would be the best way to fix this issue? Is there a way I could tag all the latest files in the ROOT trunk as the "definite" version of the file?
更多信息
- 是的, main和 trunk是同一回事。我已经澄清了我的问题
- 当您从功能分支合并回来时,您是否首先从主干进行了另一次合并以中止最新的主干更改?是的。主干处于最新状态
- 一切都搞砸了提交:我的意思是提交很好,但是很快我开始从主干/到主干合并,SVN抱怨树冲突。
- 我有200多个树冲突。所以我要寻找的是接受所有命令
- Yes, 'main' and 'trunk' is the same thing. I have clarified my question
- When you merged back from the feature branch, did you first do another merge from the trunk to aborb the latest trunk changes?" Yes. The trunk was up-to-date. And the dev branch had all the changes from the trunk.
- "everything got screwed up on committing": What I meant was that the commit was fine, but then as soon as I started doing merge from the trunk/to the trunk, SVN complains about 'Tree conflicts'.
- I have over 200 tree conflicts. So what I'm looking for is a "accept all" command
elhoim解决方案不能解决我的问题。但是,他正确解决了SVN版本问题。目前(2009年10月28日),Assembla使用的是SVN v1.5.1,而我的tortoiseSVN的版本是v1.6。所以这就是我遇到太多树冲突的原因。由elhoim的链接提供,并且无效(我尝试了多次合并,然后尝试进行HEAD-to-HEAD合并。因此我的文件因此没有移到根分支。)
elhoim solution did not fix my problem. However, he was right with SVN version issues. Currently (2009-10-28), Assembla is using SVN v1.5.1 and my tortoiseSVN was v1.6. So that was the reason I was having so much tree conflict. I tried using the solution as provided by elhoim's link and it did not work (I tried a bunch of merge multiple times before trying the HEAD-to-HEAD merge. Some files didn't carry over to the root branch because of that).
看到HEAD-to-HEAD合并仍然不起作用,我决定简单地删除我的分支文件夹中的所有 .svn文件,将文件复制到ROOT文件夹中并进行提交。
Seeing that an HEAD-to-HEAD merge would still not work, I decided to simply delete all ".svn" files in my branch folder, copy the files into the ROOT folder and do a commit.
推荐答案
这个答案应该会有所帮助。
否则,您是否使用乌龟SVN客户端1.6.x?似乎如果SVN服务器小于1.5.6 ...
Else, do you use a tortoise SVN client 1.6.x? It seems it has problems if the SVN server is less than 1.5.6...
这篇关于如何“解决” SVN分支/树冲突?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!