[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: tree conflict: local add, incoming add upon merge

From: David Tombs <cyan.spam_at_gmail.com>
Date: Tue, 24 May 2011 19:35:49 -0400

On 05/24/2011 11:05 AM, Stefan Sperling wrote:
> On Tue, May 24, 2011 at 10:45:09AM -0400, David Tombs wrote:
>> Hi Subversion Gurus,
>>
>> I have a question about merging with a tree conflict.
>>
>> 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.
>
> The problem with tree conflicts is that each one is unique.
> You might always find more creative ways of solving them.
> But I think that you've taken a very good approach.
>
> In short, whatever works for you is best :)
>

Hi Stefan,

Thanks for the response. Unfortunately, I don't think my solution turned
out very well. I ended up with a corrupted working copy that thought
bar.java was there but the server disagreed whenever I did a
server-hitting command.

I guess what I should have done instead was delete config and then
re-add bar.java instead of reverting it.

Thanks,
David
Received on 2011-05-25 01:36:21 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.