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
Received on Fri Jul 23 15:40:55 2004