简体   繁体   English

替代cvs2svn执行cvs到svn迁移

[英]Alternative to cvs2svn for performing cvs to svn migration

I am trying to perform a migration from cvs to svn on my our new XServe server which is running OS X Server. 我正在尝试在运行OS X Server的新XServe服务器上执行从cvs到svn的迁移。 There is a known conflict between the cvs2svn and dbm libraries that come pre-installed with OS X. The error is: 预安装OS X的cvs2svn和dbm库之间存在已知冲突。错误是:

ERROR: cvs2svn uses the anydbm package, which depends on lower level dbm libraries. 错误:cvs2svn使用anydbm包,它依赖于较低级别的dbm库。 Your system has dbm, with which cvs2svn is known to have problems. 您的系统具有dbm,已知cvs2svn存在问题。 To use cvs2svn, you must install a Python dbm library other than dumbdbm or dbm. 要使用cvs2svn,必须安装除dumbdbm或dbm之外的Python dbm库。 See http://python.org/doc/current/lib/module-anydbm.html for more information. 有关更多信息,请参见http://python.org/doc/current/lib/module-anydbm.html

I followed all the prescribed steps in the cvs2svn FAQ but the error still persists. 我按照cvs2svn FAQ中的所有规定步骤操作,但错误仍然存​​在。 Does anyone know of an alternative way to accomplish this task, or another website that offer a different solution to this seemingly common problem? 有没有人知道完成这项任务的另一种方法,或者为这个看似常见的问题提供不同解决方案的另一个网站?

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. 由于CVS和Subversion存储库实际上只是文件集合,解决此问题的一种方法可能是将CVS存储库复制到cvs2svn可以成功运行的机器上,运行它以转换为Subversion,然后将新存储库复制回你的服务器。 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. 此方法的另一个好处是,您不会冒执行此转换步骤时意外弄乱服务器配置的风险。

cvs2svn itself is available in MacPorts so, instead of just the dbm libraries, you could install cvs2svn using MacPorts: cvs2svn本身在MacPorts中可用,因此,您可以使用MacPorts安装cvs2svn,而不仅仅是dbm库:

port install cvs2svn

If not already installed, it will also install the MacPorts version of python2.5 and other dependencies. 如果尚未安装,它还将安装MacPorts版本的python2.5和其他依赖项。 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. 优点是你应该有一个工作的,受支持的版本,而不必解决进一步的依赖问题。

If you already have subversion installed , Did you make sure that the path is set right in your system variables? 如果您已经安装了subversion,您是否确保在系统变量中设置了路径?

I had that same issue on mine and I ended up having to add the variables in Python_Home and path to use 我有同样的问题,我最终不得不在Python_Home中添加变量和使用路径

C:\\Pyton27\\ C:\\ Pyton27 \\

您始终可以使用例如MacPorts手动安装其他dbm库。

Maybe sounds a bit crazy or overkill, but think about using 'git' (eg MacPorts version). 也许听起来有点疯狂或矫枉过正,但想想使用'git'(例如MacPorts版本)。 It clones the complete CVS history and pushes it into a Subversion repository. 它克隆完整的CVS历史记录并将其推送到Subversion存储库。 The following steps should do the work (look at the command's manuals, git help ´cmd´): 以下步骤应该完成工作(查看命令手册,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! 你完成了!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM