You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Robert P. J. Day" <rp...@crashcourse.ca> on 2008/09/08 09:33:37 UTC

merge all of branch into trunk?

   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


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

Re: merge all of branch into trunk?

Posted by Benjamin Smith-Mannschott <bs...@gmail.com>.
On Sep 8, 2008, at 18:33, DW Dennis Wheeler wrote:

>
>> -----Original Message-----
>> From: Benjamin Smith-Mannschott [mailto:bsmith.occs@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 \
>> 	$BRANCH_URL \
>> 	$PATH_TO_TRUNK_WORKING_COPY
>>
>
> (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@xxxxx $BRANCH_URL@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@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

RE: Re: merge all of branch into trunk?

Posted by DW Dennis Wheeler <dw...@ag.com>.
> -----Original Message-----
> From: Benjamin Smith-Mannschott [mailto:bsmith.occs@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 \
> 	$BRANCH_URL \
> 	$PATH_TO_TRUNK_WORKING_COPY
> 

(you left out the 'r' in 'svn merge -r$(svn ...)...')

svn merge $PATH_TO_TRUNK_WORKING_COPY@xxxxx $BRANCH_URL@xxxxx


> Isn't that horrible?  I'll be watching this thread to see if 
> someone has an actually useful suggestion.
> 
> // Ben
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
> 
> 

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


Re: merge all of branch into trunk?

Posted by Benjamin Smith-Mannschott <bs...@gmail.com>.
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

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 \
	$BRANCH_URL \
	$PATH_TO_TRUNK_WORKING_COPY

Isn't that horrible?  I'll be watching this thread to see if someone  
has an actually useful suggestion.

// Ben


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