Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix Tree conflict issue in SVN

Tags:

svn

I am new to SVN.

I found a conflict message as shown below:

rahulv@SWS306:~/sp/s2$ svn status
M       Gemfile
M       Gemfile.lock
M       config/intializers/secret_token.rb
D     C tmp
      >   local dir unversioned, incoming dir add upon update
D       tmp/cache
?       tmp/data
D       tmp/pids
D       tmp/sessions
D       tmp/sockets
Summary of conflicts:
  Tree conflicts: 1
rahulv@SWS306:~/sp/s2$

The issue occurred after updating using 'svn up' command.

How to fix this issue?

like image 773
webster Avatar asked Dec 18 '14 04:12

webster


People also ask

How do I stop tree conflict in svn?

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.

How do you resolve tree conflict?

Other tree conflicts If you want to keep the folder from the merge target, just mark the conflict as resolved. If you want to use the one in the merge source then you need to SVN delete the one in the target first and run the merge again. If you need anything more complicated then you have to resolve manually.

What does C mean in svn?

Yes, C is for conflict. You want: svn resolve --accept mine-full my_sysconfig.ini.


1 Answers

I had this issue today, and because I didn't want keep the current contents of the new versioned directory, simple solution was:

svn status      # review current situation
svn revert tmp  # fix, replace tmp with right path for you
svn status      # verify there are no conflicts any more

Of course, if there's any doubt that the existing non-versioned directory contains anything valuable, copy that elsewhere first (and then possibly add to SVN after reverting, if those files should be under version control).

like image 118
hyde Avatar answered Sep 30 '22 11:09

hyde