Alternative to cvs2svn for performing cvs to svn migration

北战南征 提交于 2019-12-23 17:31:05

问题


I am trying to perform a migration from cvs to svn on my our new XServe server which is running OS X Server. There is a known conflict between the cvs2svn and dbm libraries that come pre-installed with OS X. The error is:

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.

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


回答1:


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.




回答2:


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.




回答3:


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




回答4:


If you already have subversion installed , Did you make sure that the path is set right in your system variables?

I had that same issue on mine and I ended up having to add the variables in Python_Home and path to use

C:\Pyton27\




回答5:


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!



来源:https://stackoverflow.com/questions/1190413/alternative-to-cvs2svn-for-performing-cvs-to-svn-migration

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!