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

Re: New SVN Repos from CVS

From: Alan Barrett <apb_at_cequrux.com>
Date: Thu, 28 Aug 2008 09:22:12 +0200

On Wed, 27 Aug 2008, Tom Browder wrote:
> svn rm prog/trunk
> svn cp prog/branches/X prog/trunk
>
> Wow, I have to start thinking big with svn! Looks like it should
> work. Anyone see any problems?

Yes, that will work, but it makes the change in two revisions. The
trunk will not exist at all during the time between the two commits,
which may be confusing or otherwise undesirable, especially if people in
the future attempt to diff against old revisions of the trunk.

I'd use mucc to do it all in a single revision:

    REPO="svn://server/repo"
    BRANCHREV="42"
    mucc -m "Delete old trunk and replace it with a copy of branch X" \
        rm "$REPO/prog/trunk" \
        cp "$BRANCHREV" "$REPO/prog/branches/X" "$REPO/prog/trunk"

mucc is available somewhere in the svn source code, but it's not
installed by default, and you might find it named either "svnmucc" or
"mucc" depending on the version of svn.

--apb (Alan Barrett)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-08-28 09:25:36 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.