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

Re: merge all of branch into trunk?

From: Benjamin Smith-Mannschott <bsmith.occs_at_gmail.com>
Date: Mon, 8 Sep 2008 22:23:23 +0200

On Sep 8, 2008, at 18:33, DW Dennis Wheeler wrote:

>> -----Original Message-----
>> From: Benjamin Smith-Mannschott [mailto:bsmith.occs_at_gmail.com]
>> Sent: Monday, September 08, 2008 8:15 AM
>> To: Subversion Users
>> Subject: Re: merge all of branch into trunk?
>> On Sep 8, 2008, at 11:33, Robert P. J. Day wrote:
>>> i'm sure there's a trivial answer to this, but what is the merge
>>> incantation to merge all of a branch's revisions since i
>> branched into
>>> the trunk? it is, of course, easy enough to check the log on the
>>> branch, get the copy revision, then use that, but is there
>> a shorter
>>> form that allows me to be unspeakably lazy? thanks.
>>> rday
>> svn merge --reintegrate? if branch is up-to-date with trunk
>> and you are using svn 1.5
> as long as you're setting the condition to keep the branch up-to-date
> with the trunk... (and you know that last merged revision number:
> xxxxx)
> ...then this otherwise step becomes a little easier...
>> otherwise ... muhahaha:
>> svn merge -$(svn log -q --stop-on-copy $BRANCH_URL \
>> | tail -n 2 | head -n 1 | egrep -e "^r[1-9][0-9]+" -o):HEAD \
> (you left out the 'r' in 'svn merge -r$(svn ...)...')

No, in fact, I didn't, which is part of what makes this horrid thing
worthy of diabolical laughter. (The "r" is part of the expression
matched by egrep, which is passed through by -o.)

> svn merge $PATH_TO_TRUNK_WORKING_COPY_at_xxxxx $BRANCH_URL_at_xxxxx

I'd probably just end up hurting myself by trying to use the peg-
revision syntax this way, but if I understand it correctly, we could
be saying compare the trunk at some revision (presumably when the
branch was created) to the branch at some revision (likely HEAD) and
apply those changes to the local working copy, which defaults to
present working directory if it's not given.

// ben

To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-09-08 22:23:54 CEST

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.