[Svnmerge] Merging two branches

Romulo Ceccon romuloceccon at gmail.com
Tue Feb 10 07:08:11 PST 2009


2009/2/5 Jorge Medina <jmedina at e-dialog.com>

>  Hi
>     I am using svnmerge.py and I came to the following scenario:
>
>     I created branch A
>     Some weeks later, branch B was created.
>
>     The feature in branch A is done, but I am not allowed to merge it back
> to the trunk because we are just finishing work on it for a release (that
> won't have feature A)
>
>     I need to work on some other feature on branch B (created also from the
> trunk) but I would really like to have feature A integrated into this
> branch.
>
>     Can svnmerge.py be used to merge these two branches?
>

If you initialized the trunk with branch A before creating branch B then
branch B will be already initialized with branch A information. So you can
just do "$ svnmerge merge -S branch_A" from a branch B checkout and get the
appropriate revisions merged. Then you have two options:

  - Uninitialize branch A from the trunk. When you merge the branch B back
to the trunk it will contain both branch A and branch B changes.
  - Block, on the trunk, the commit of branch B which integrated the changes
from branch A. You should then be careful with changes on branch B made on
code that came from branch A. If that happens then, when integrating both
branches back to the trunk, leave those changes to be merged only after the
changes of branch A and the changes of branch B before integration from
branch A have already been merged.

In case branch B does not have branch A information integrate the changes
manually with "svn merge" (or initialize branch B with branch A, saying to
svnmerge the revision of the trunk from which branch A was created) and
choose one of the two option above.

Regards,
Romulo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/svnmerge/attachments/20090210/338644c2/attachment.html>


More information about the Svnmerge mailing list