2009-07-27 139 views
3

我正嘗試在我運行OS X Server的新XServe服務器上執行從cvs到svn的遷移。還有就是已經預先安裝了OS X的錯誤是cvs2svn和DBM庫之間的已知衝突:替代cvs2svn執行cvs遷移到svn

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.

我跟所有的cvs2svn FAQ規定的步驟,但錯誤依然存在。有誰知道完成這項任務的另一種方式,或另一個網站爲這個看似普遍的問題提供了不同的解決方案?

+0

相關http://stackoverflow.com/questions/ 922750 – 2012-01-10 00:12:25

回答

7

由於CVS和Subversion版本庫實際上只是文件集合,解決此問題的一種方法可能是將CVS存儲庫複製到可以成功運行cvs2svn的機器,運行它以轉換爲Subversion,然後複製新的存儲庫返回到您的服務器。此方法的附加好處是,在執行此轉換步驟時,您不會冒着意外地搞亂服務器配置的風險。

1

您總是可以使用例如手動方式手動安裝其他dbm庫。 MacPorts的。

0

也許聽起來有點瘋狂或過於誇張,但考慮使用'git'(例如MacPorts版本)。它克隆完整的CVS歷史並將其推送到Subversion存儲庫中。下面的步驟應該做的工作(看看命令的手冊,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 

你完成了!

+1

但請注意,git-cvsimport已知會轉換除最瑣碎的CVS存儲庫以外的所有嚴重問題:http://marc.info/?l=git&m=123626637729412&w=2 – mhagger 2009-07-28 08:58:24

3

cvs2svn本身是MacPorts的這麼用,而不只是DBM庫,你可以安裝使用cvs2svn的MacPorts:

port install cvs2svn 

如果尚未安裝,它還將安裝的python2.5的版本MacPorts的和其他依賴關係。這並沒有什麼壞處,但需要一點時間和一點額外的空間。優點是你應該有一個工作,支持的版本,而不必打擊進一步的依賴問題。

1

如果你已經安裝了subversion,你確定你的系統變量的路徑設置正確嗎?

我有我的同樣的問題,我最後不得不加入PYTHON_HOME和路徑變量使用

C:\ Pyton27 \