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

Re: Merging 2 branches

From: Baz <brian.ewins_at_gmail.com>
Date: 2006-05-10 10:55:37 CEST

On 5/10/06, Lakshman Srilakshmanan
<lakshman.srilakshmanan@tradingpost.com.au> wrote:
> 1) create branch_A
> 2) create branch_B
> 3) change 1 made to branch_A @ rev 183
> 4) change 2 made to branch_A @ rev 184
> 5) change 3 made to branch_A @ rev 185
> 6) check-out branch_B and make it my current working dir.
> 7) svn merge svn://lakshman@lisa/Enterprise/Common/trunk
> svn://lakshman@lisa/Enterprise/Common/branches/branch_A
> As per your email, I would have expected only changes in "rev 185" (ie
> change 3) to be merged into branch_B. But instead, I found all the
> changes from the previous revisions as well. This has got me perplexed.

I'm not sure how you got that from my mail... its pretty clear that's
what would happen. It helps to think about merge as 'diff-and-apply',
as it says in the svn book. In this case you've said "take the
difference between the trunk and branch A, then apply it to branch B".
Can you see that the differrence here is r183,r184,r185, ie the
accumulation of changes on branch A?

The thing that confuses most people I think is the word 'merge'. They
think that 'merge branch_A branch_B' means merge A and B, when it
really means 'build the set of changes that would transform A into B
and apply them to my working copy'

> This is starting to drive me round the bend. Thank god the windows on my
> 7th floor are reinforced.


To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed May 10 10:57:07 2006

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.