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

Re: Merging a branch back to trunk

From: Blair Zajac <blair_at_orcaware.com>
Date: 2006-11-29 04:24:34 CET

Christoph Bartoschek wrote:
> Hi,
>
> what is the best procedure to merge a branch with lots of changes back to
> trunk?
> The subversion book suggests using merge with the changes between the split
> and the current branch version. However this would mean that I have to
> resolve all the conflicts again that I resolved when I ported changes from
> trunk to the branch.
>
> One the other hand one could delete the current trunk and move the branch to
> trunk. However this would mean that the history of the trunk between the
> split and the deletion is lost.
>
> What is recommended?

A little late for this, but you could merge the commits on the branch that are
original to that branch (and not merges from trunk) back into trunk. If you
could figure this out (hopefully from log messages indicating of the commit was
a merge).

You could also do a merge using the branch URL and the trunk URL as the diff

cd trunk
svn merge http://.../branches/mybranch http://.../trunk .

that should make the two identical.

In the future, I would recommend using svnmerge.py and the bidirectional merge
support to prevent original commits on trunk or branch from being merged back
onto the original location. It'll save you a ton of grief and pain later on.
We use it all the time for per-developer or per-feature branches, which see
merges from trunk and merge back to trunk.

Using svnmerge.py will let it worry about which revisions are available to merge
into your branches or trunk.

Regards,
Blair

-- 
Blair Zajac, Ph.D.
<blair@orcaware.com>
Subversion training, consulting and support
http://www.orcaware.com/svn/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Nov 29 04:25:15 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.