You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by bo...@gmail.com on 2007/08/24 13:57:01 UTC

Merging Branch to Trunk

Hi, 

I’ve yet to see a clear explanation for this so bear with me as it’s
obviously a hot topic.

Paraphrasing the subversion manaual section "Merging a Whole Branch to
Another", the process of merging changes from branch to trunk is by way of: 

$ cd <trunk wc>
$ svn update
$ svn merge <revision range> <branch-url>

Fair enough. 

First question: Does this still work if during branch development, certain
changes (but not all) were ported to branch from trunk ?

OK I'll continue. Let's say I finish development and want to port my branch
back to the trunk. Tha manual says to first port all latest changes from
trunk to branch and then:

$ cd <trunk wc>
$ svn update
$ svn merge <trunk url@HEAD> <branch url@HEAD>

Second question: Would this not produce the same result as the top example ?
And if not why not ?

Thanks in advance.

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.484 / Virus Database: 269.12.4/969 - Release Date: 23-Aug-2007
16:04
 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Merging Branch to Trunk

Posted by Hari Kodungallur <hk...@gmail.com>.
On 8/24/07, bobf32@gmail.com <bo...@gmail.com> wrote:
>
> Hi,
>
> I've yet to see a clear explanation for this so bear with me as it's
> obviously a hot topic.
>
> Paraphrasing the subversion manaual section "Merging a Whole Branch to
> Another", the process of merging changes from branch to trunk is by way
> of:
>
> $ cd <trunk wc>
> $ svn update
> $ svn merge <revision range> <branch-url>
>
> Fair enough.
>
> First question: Does this still work if during branch development, certain
> changes (but not all) were ported to branch from trunk ?


It depends on what changes you made. If you made modifications to the same
changes affected by the merge (of certain revisions from trunk to branch),
then you can potentially get conflicts. If not, it should work fine.



OK I'll continue. Let's say I finish development and want to port my branch
> back to the trunk. Tha manual says to first port all latest changes from
> trunk to branch and then:
>
> $ cd <trunk wc>
> $ svn update
> $ svn merge <trunk url@HEAD> <branch url@HEAD>


This is one of the approaches that is described in the manual. You will use
it when you have to regularly update from trunk to branch to keep the branch
development in sync with the trunk development.


Second question: Would this not produce the same result as the top example ?
>
And if not why not ?


Yes, it should produce the same result as above. This is another way to
accomplishing the same thing. Depending on the situation, you will either
merge all your branch changes to trunk at one go and test it or you will
keep the branch in sync with the trunk, test the branch and then merge to
the trunk. At the end of the day, if done correctly, both the approaches
merge the changes in the branch to the trunk.


Regards,
-Hari Kodungallur