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

Re: Merging Branch back to Trunk

From: Mark Phippard <markphip_at_gmail.com>
Date: Sat, 7 Feb 2009 11:27:16 -0500

On Sat, Feb 7, 2009 at 11:15 AM, <blackhole_at_collab.net> wrote:
> For those seeking an answer — I have the solution.
> 1. Change to your branch
> 2. merge the trunk into your branch to reflect most recent trunk changes, eventually commit your branch (this is easily done either through merge tracking in SVN 1.5 or via svnmerge.py)
> 3. Change to trunk
> 4. Here is the magic command
> --- svn merge ._at_HEAD branch_url_at_HEAD
> :) this will compare the two final source trees and just move the neccessary changes from the branch to the trunk — __WITH NO CONFLICTS AT ALL__
> Commit and enjoy ;)

Yes, that is correct. However, SVN 1.5 does offer a short hand for
this. In step 4:

svn merge --reintegrate branch_url

Internally, this runs the same command you did. However it does some
checking that can help prevent merge problems. For example, it does
not specify @HEAD, instead it figures out the last revision from trunk
that was actually synched to the branch and uses that revision.

There have been some problems where these checks were not smart enough
and so it would give an error rather than run, and then you wind up
having to use the command you specified. But as of the 1.5.5 release
on the client, these checks are all much more intelligent now so it
should be possible to use it.

Mark Phippard
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-02-07 17:28:02 CET

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.