Tue, 24 May 2011 10:45:09 -0400, /David Tombs/:

I created the same directory, called 'config' on two branches. The
directory had different files on each branch, let's call them 'foo.java'
on branch A and 'bar.java' on branch B.

When I merged branch A ->  branch B, I got a "tree conflict" saying "local
add, incoming add upon merge." I can understand this error: the merge
tried to add the directory as expected but it was already there. My
desired resolution is to keep the 'config' directory and just add the file
from branch A. That is, 'config' would contain both foo.java and bar.java.

The only way to achieve this I found was to delete 'config' (with no
commit), do the merge, and then revert the deletion of bar.java. It
worked, but it seems weird to do a delete just to revert it. Do you know
any better way of doing it?  It took me a while to figure out the
solution, with lots of fruitless Googling.

Suppose you've checked out branch A and then merged with branch B:

svn merge ^/branches/B

You've got tree conflict for the "config" directory saying "local add, incoming add upon merge". Then you additionally merge:

svn merge ^/branches/B/config config

--
Stanimir

Reply via email to