[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: Lakshman Srilakshmanan <lakshman.srilakshmanan_at_tradingpost.com.au>
Date: 2006-05-11 02:13:59 CEST

Hi Baz,

My understanding of merge is the same as you explained - find the diff
and apply.

My confusion started when I read an extract from an earlier
correspondence in this thread as shown below.

> svn merge .../trunk .../branch_A
> makes changes equivalent to undoing r12 and applying r10.
> Applying this will not apply all the changes from branch A to branch B
> - r2, r5 get missed.

Why would r2 and r5 be missed ? r2 & r5 would be the same as r183 & r184
in my example.

Could you please help me to understand the reasoning for the above in
your earlier correspondence.

Thanks
Lakshman

> -----Original Message-----
> From: Baz [mailto:brian.ewins@gmail.com]
> Sent: Wednesday, 10 May 2006 6:56 PM
> To: Lakshman Srilakshmanan
> Cc: users@subversion.tigris.org
> Subject: Re: Merging 2 branches
>
> 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 Thu May 11 02:18:34 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.