Moving from CVS to SVN for syncing source tree

As many know, the ports tree will soon be unavailable via CVS. I imagine at some point in the near future the source tree will drop CVS support as well. Thus I'd like to move to SVN for maintaining the source tree on my machines, but I've run into a couple issues. I know about the Subversion Primer, but that seems mostly oriented toward developers.

First is moving from one branch to another, i.e. the CVS equivalent of changing tags, such as from RELENG_9_0 to RELENG_9_1. In SVN, I would have thought this would be possible just by checking out to the same location with a different URL, but this doesn't work. For instance, if I've already checked out svn://svn.freebsd.org/base/stable/9 (RELENG_9 in CVS) to /usr/src/, and then try to change to what would be RELENG_9_1 in CVS via this command:
[CMD="svn"]co svn://svn.freebsd.org/base/releng/9.1 /usr/src[/CMD]
I get the following error:
Code:
svn: E155000: '/usr/src' is already a working copy for a different URL
Of course, I can rm -r /usr/src/.svn, and then check out the new branch, but is this the correct procedure?

Secondly, it appears that SVN keeps a second, cached copy of the "unmodified" branch in the .svn directory, to aid developers with features like offline diff. While I'm sure this is useful for developers, for end users it adds unnecessary bloat to backups. From my quick looking at the documentation from svn help co, it doesn't look like there is any way to prevent it from making this copy, but perhaps someone here knows another way?
 
Orum said:
Of course, I can rm -r /usr/src/.svn, and then check out the new branch, but is this the correct procedure?

Yes.

Secondly, it appears that SVN keeps a second, cached copy of the "unmodified" branch in the .svn directory, to aid developers with features like offline diff. While I'm sure this is useful for developers, for end users it adds unnecessary bloat to backups. From my quick looking at the documentation from svn help co, it doesn't look like there is any way to prevent it from making this copy, but perhaps someone here knows another way?

At present, no. Some work has been done on a svnup command, but it's not clear when that will make it into the system.
 
Note: for switching svn repos, you can use the svn switch command. For example, the following works to checkout 9.0, then switch to 9-STABLE:
Code:
# cd /usr/src
# svn checkout svn://svn.freebsd.org/base/releng/9.0
# svn switch svn://svn.freebsd.org/base/stable/9
 
Back
Top