I had a feature branch of my trunk and was merging changes from my trunk into my branch periodically and everything was working fine. Today I went to merge the branch back d
In my experience, SVN creates a tree conflict WHENEVER I delete a folder. There appears to be no reason.
I'm the only one working on my code -> delete a directory -> commit -> conflict!
I can't wait to switch to Git.
I should clarify - I use Subclipse. That's probably the problem! Again, I can't wait to switch...
I came across this problem today as well, though my particular issue probably isn't related to yours. After inspecting the list of files, I realized what I had done -- I had temporarily been using a file in one assembly from another assembly. I have made lots of changes to it and didn't want to orphan the SVN history, so in my branch I had moved the file over from the other assembly's folder. This isn't tracked by SVN, so it just looks like the file is deleted and then re-added. This ends up causing a tree conflict.
I resolved the problem by moving the file back, committing, and then merging my branch. Then I moved the file back afterward. :) That seemed to do the trick.
I don't know if this is happening to you, but sometimes I choose the wrong directory to merge and I get this error even though all the files appear completely fine.
Example:
Merge /svn/Project/branches/some-branch/Sources to /svn/Project/trunk ---> Tree conflict
Merge /svn/Project/branches/some-branch to /svn/Project/trunk ---> OK
This might be a stupid mistake, but it's not always obvious because you think it's something more complicated.
Subversion 1.6 added Tree Conflicts to cover conflicts at the directory level. A good example would be when you locally delete a file then an update tries to bring a text change down on that file. Another is when you you have a subversion Rename of a file you are editing since that is an Add/Delete action.
CollabNet's Subversion Blog has a great article on Tree Conflicts.
I had a similar problem. The only thing that actually worked for me was to delete the conflicted subdirectories with:
svn delete --force ./SUB_DIR_NAME
Then copy them again from another root directory in the working copy that has them with:
svn copy ROOT_DIR_NAME/SUB_DIR_NAME
Then do
svn cleanup
and
svn add *
You might get warnings with the last one, but just ignore them and finally
svn ci .
A scenario which I sometimes run into:
Assume you have a trunk, from which you created a release branch. After some changes on trunk (in particular creating "some-dir" directory), you create a feature/fix branch which you want later merge into release branch as well (because changes were small enough and the feature/fix is important for release).
trunk -- ... -- create "some-dir" -- ...
\ \-feature/fix branch
\- release branch
If you then try to merge the feature/fix branch directly into the release branch you will get a tree conflict (even though the directory did not even exist in feature/fix branch):
svn status
! C some-dir
> local missing or deleted or moved away, incoming file edit upon merge
So you need to explicitly merge the commits which were done on trunk before creating feature/fix branch which created the "some-dir" directory before merging the feature/fix branch.
I often forget that as that is not necessary in git.