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

Re: Standard setup for multiple branch merges?

From: Duncan Murdoch <subversion_at_murdoch-sutherland.com>
Date: 2004-07-23 21:41:34 CEST

No answers on the question below yet, so let me ask a simpler one.

In CVS it was possible to use a tag as a placeholder, and then move it
to a new position. What's the best way to do this in Subversion?
Below I was doing it using

> svn rm -m'branch update' $REPOS/tags/last-patch-update
> svn cp -m'branch update' $REPOS/tags/patch-update $REPOS/tags/last-patch-update

but this causes two commits. I could do it with only one commit with
something like

cd $RTOP/R/r-patched
svn switch $REPOS/tags/last-patch-update
svn merge $REPOS/tags/last-patch-update $REPOS/branches/$TAG
svn commit -m'branch update'
svn switch $REPOS/branches/$TAG

but this looks ugly. Is there a standard way to do this?

Duncan Murdoch

On Fri, 23 Jul 2004 09:40:38 -0400, Duncan Murdoch
<subversion@murdoch-sutherland.com> wrote :

>I'm working in the R project, and we've just switched from CVS to
>Subversion. Our practice is to create a branch (currently
>R-1-9-patches) at the time of a release for bug fixes; the trunk is
>for the main development.
>
>At fairly regular intervals we merge the changes on R-1-9-patches into
>the trunk. Our CVS script to do this looked like this:
>
>> # assumes that "last-patch-update" is set correctly
>>
>>export RTOP=~/R-devel #adjust as necessary
>>export TAG=R-1-9-patches
>>
>>cd $RTOP/r-devel/R
>>cvs rtag -F -r $TAG patch-update R
>>
>>cvs update -Pd
>>cvs update -Pd -j last-patch-update -j patch-update
>>find -type f | xargs grep '>>>>>>>'
>> # fix conflicts...
>>cvs commit -m 'branch update'
>>
>> # better do this right away...
>>cvs rtag -F -r patch-update last-patch-update R
>
>I think I can do a fairly literal translation of this to Subversion;
>it looks like this (but is untested, so might have dumb errors):
>
>>export REPOS=https://svn.r-project.org/R
>>export RTOP=~/R-devel #adjust as necessary
>>export TAG=R-1-9-patches
>>
>>svn rm -m'branch update' $REPOS/tags/patch-update
>>svn cp -m'branch update' $REPOS/branches/$TAG $REPOS/tags/patch-update
>>
>>cd $RTOP/r-devel/R
>>svn update
>>svn merge $REPOS/tags/last-patch-update $REPOS/tags/patch-update
>>
>>find -type f | xargs grep '>>>>>>>'
>> # fix conflicts... (remember to use svn resolved for each)
>>svn commit -m 'branch update'
>>
>> # better do this right away so we don't forget...
>>svn rm -m'branch update' $REPOS/tags/last-patch-update
>>svn cp -m'branch update' $REPOS/tags/patch-update $REPOS/tags/last-patch-update
>
>However, I have the feeling that this isn't the right way to do it.
>(For one thing, it results in 5 commits; I'd like just one.) The
>Subverison book talks about doing this without tags, just using the
>comments in the log to figure out which revision numbers need to be
>merged in. I'd like to avoid having to search through the log, so it
>seems to me that storing the revision numbers corresponding to
>last-patch-update and patch-update in properties somewhere would be a
>better approach.
>
>Can an experienced Subversion user comment on this? This must be a
>problem that others have solved; is there some standard solution
>around on the net somewhere?
>
>Duncan Murdoch
>
>---------------------------------------------------------------------
>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
Received on Fri Jul 23 21:41:47 2004

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.