I get this error message from SVN:
svn: Attempt to add tree conflict that already exists
Now, this has already been asked on this site and the given explanation is that a tree conflict has not been resolved after a previous merge, and now SVN is trying to add the same tree conflict again.
So I called "svn status" and marked all tree conflicts as resolved. I then did *svn revert -R ** and double-checked that the output of "svn status" is completely empty. I then tried the merge again, with the exact same error message at the exact same place.
It seems to me like svn tries to add a tree conflict in the very same place twice during the same merge operation, which, with all due respect, would be a severe bug in SVN.
It seems like the source of this was a folder that I renamed in a way that is not to SVN's liking. Instead of using the svn move command, I renamed the folder locally, deleted the old folder name with svn remove and added the new one with svn add. However, this spawns a "phantom folder" that has the old name - it exists neither in the working copy nor in the repository, but SVN thinks it exists. A phantom folder causes the fatal tree conflict I mentioned above.
Here is how we solved this:
Merge the trunk into the branch. The branch is now what you eventually want your trunk to be.
Create a new branch as a clone of the trunk.
Switch your working directory to the up-to-date branch (i.e. the one you eventually want as the trunk). Use svn diff > update.patch
there.
Copy update.patch into the folder of the newly created clone branch.
Switch your working directory to that of the clone branch and apply the patch. The clone branch is now nearly identical with the up-to-date-branch, with one difference: There is no mention of the phantom folder in those hidden svn files.
Merge the clone branch back into the trunk.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With