urs@isnogud.escape.de wrote:
> What is the best practice to abandon the current trunk and make some
> branch the new trunk? Say I have created a branch by calling
>
> svn copy trunk branch/foo
>
> and then make changes on the branch and on the trunk. After a while I
> decide that I won't further develop the trunk version and that
> branch/foo should be the new trunk. I would do it this way:
>
> svn rm trunk; svn move branch/foo trunk
>
> Is this the correct and best way to do it? Or are there any drawbacks
> or better ways?
I'm not sure how that approach would work for people who have a working
copy of the trunk, as an update would only (I think; I haven't tested)
say, "these files have been deleted" without knowing that they're being
replaced by another line of code. And, of course, this appproach
requires either two commits, with no trunk existing in the middle, or
for someone to check out the entire repository--neither of which are
ideal.
That said, a better option is to use merge:
# svn co trunk
# cd trunk
# svn merge trunk branch .
# svn ci -m "Replaced trunk with branch"
Note that the merge command asks for the delta from trunk to branch, and
applies that to the trunk, turning it into the branch line of code.
This is different from the usual merge command (svn merge -r x:y branch
.), which just asks for the delta of changes along a branch, and
preserves any modifications that've been made to the trunk itself.
-David
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Jun 9 13:14:56 2006