views:

470

answers:

4

I am trying to perform a migration from cvs to svn on my our new XServe server which is running Mac OSx server edition. There is a known conflict between the dbm libraries that come pre installed with mac osx and the cvs2svn. The error it gives is this "ERROR: cvs2svn uses the anydbm package, which depends on lower level dbm libraries. Your system has dbm, with which cvs2svn is known to have problems. To use cvs2svn, you must install a Python dbm library other than dumbdbm or dbm. See http://python.org/doc/current/lib/module-anydbm.html for more information." and is docummented here : http://cvs2svn.tigris.org/faq.html

I followed all the steps in the faq to fix the issue but the error still persists. Does anyone know of an alternative to cvs2svn to accomplish this task or another website that offer a different solution to this seemingly common problem.

A: 

You could always manually install other dbm libraries using e.g. MacPorts.

Mike McQuaid
+5  A: 

Since CVS and Subversion repositories are really just collections of files, one way to work around this problem might be to copy your CVS repository to a machine where cvs2svn can run successfully, run it to convert to Subversion, and then copy the new repository back to your server. The added benefit of this method is that you won't run the risk of accidentally messing up your server configuration while doing this conversion step.

Greg Hewgill
A: 

Maybe sounds a bit crazy or overkill, but think about using 'git' (e.g. MacPorts version). It clones the complete CVS history and pushes it into a Subversion repository. The following steps should do the work (look at the command's manuals, git help ´cmd´):

    port install git-core cvs cvsps svn (if necessary)

    create directory for git and init cvs git repo (let´s say ´cd ~/cvsgit´):
    git cvsimport -v -d CVSROOT module

    create new subversion repository (svnadmin) with trunk, tags, branches
    now import this new repository to a git repository:
    git svn clone -s file:///path/to/svnrepo  (without trunk, tags, branches)
    this creates a svnrepo directory; rename and move it to e.g. ~/svngit

    now add the cvs git repo to svn repo:
    cd ~/svngit
    git remote add cvsrepo ~/cvsgit
    git fetch cvsrepo

    now merge the cvs master branch to the local svn master branch:
    git merge remotes/cvsrepo/master

    finally commit to (real) svn repository:
    git svn dcommit

You're done!

mhagger
Like cvs2svn ;/
mtp: Please supply specifics (and bug reports!) to back up your complaint about cvs2svn. (Disclaimer: I take it a bit personally since I'm the cvs2svn maintainer.)
mhagger
+1  A: 

cvs2svn itself is available in MacPorts so, instead of just the dbm libraries, you could install cvs2svn using MacPorts:

port install cvs2svn

If not already installed, it will also install the MacPorts version of python2.5 and other dependencies. There's no harm in that but it will take a little time and a little extra space. The advantage is that you should have a working, supported version without having to fight further dependency problems.

Ned Deily