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 down into the trunk and any of the files that were added to my trunk after the creation of my branch were flagged as a "tree conflict". Is there a way to avoid this in the future?
I don't think these are being properly flagged.
When you merge your branch back into the trunk, SVN tries to do the same again: It sees that a file was created in your branch, and tries to create it in your trunk in the merge commit, but it already exists! This creates a tree conflict. The way to avoid this, is to do a special merge, a reintegration.
A tree conflict is a conflict at the folder level and occurs when the user runs an update action on a file but the file does not exist in the repository anymore because other user renamed the file, moved the file to other folder or deleted the file from repository.
Step 1: View Conflicts Select: (p) postpone, (df) diff-full, (e) edit, (mc) mine-conflict, (tc) theirs-conflict, (s) show all options: Subversion is complaining that there is a conflict with the README file, and Subversion does not know how to solve this. So Jerry chooses the df option to review the conflict.
I found the solution reading the link that Gary gave (and I suggest to follow this way).
Summarizing to resolve the tree conflict committing your working directory with SVN client 1.6.x you can use:
svn resolve --accept working -R .
where .
is the directory in conflict.
WARNING: "Committing your working directory" means that your sandbox structure will be the one you are committing, so if, for instance, you deleted some file from your sandbox they will be deleted from the repository too. This applies only to the conflicted directory.
In this way, we are suggesting SVN to resolve the conflict (--resolve
), accepting the working copy inside your sandbox (--accept working
), recursively (-R
), starting from the current directory (.
).
In TortoiseSVN, selecting "Resolved" on right click, actually resolves this issue.
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.
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