使用CVS2SVN转换CVS档案库到SVN档案库

工具上由于网上说Svnimprot有乱码问题,未敢使用,采用cvs2svn工具

转换的方式不多说,可参见附件网上的pdf中转换办法,此处主要记录下转换时遇到的问题。

首先采用Linux安装方法(Windows方法更简单),按照附件中安装的方法,

1)运行cvs2svn的时候,显示gdbm版本不对,错误如下:

ERROR: cvs2svn uses the anydbm package, which depends on lower level dbm
libraries.  Your system has dumbdbm, 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,解决办法如下:

Here is the procedure for a successful installation of cvs2svn and all supporting libs:

1.Download the gdbm-1.8.3 (or greater) source, unarchive and change directory to gdbm-1.8.3. We need to install the gdbm libraries so python's gdbm module can use them. 

a.Type ./configure



b.Edit "Makefile" so that the owner and group are not the non-existing "bin" owner and group by changing 
	BINOWN = bin
	BINGRP = bin
	to 
	BINOWN = root
	BINGRP = admin


c.Type "make"

d.Type "sudo make install"

2.Download the Python2.6 (or greater) source, unarchive, and change directory to Python2.6. We need to enable python gdbm support which is not enabled in the default OS X 10.5.5 installation of python, as the gdbm libs are not included. However, we just installed the gdbm libs in step 1, so we can now compile python with gdbm support. 

a.Edit the file "Modules/Setup" by uncommenting the line which links against gdbm by changing 

	#gdbm gdbmmodule.c -I/usr/local/include -L/usr/local/lib -lgdbm
	to 
	gdbm gdbmmodule.c -I/usr/local/include -L/usr/local/lib -lgdbm

b.Edit the file "Modules/Setup" by uncommenting the line to create shared libs by changing 

	#*shared*
	to 
	*shared*

c.Type ./configure --enable-framework --enable-universalsdk in the top-level Python2.6 directory. This will configure the installation of python as a shared OS X framework, and usable with OS X GUI frameworks and SDKs. You may have problems building if you don't have the SDKs that support the PPC platform. If you do, just specify --disable-universalsdk. By default, python will be installed in "/Library/Frameworks/Python.framework", which is what we want.

d.Type make

e.Type sudo make install

f.Type cd /usr/local/bin; sudo ln -s python2.6 python

g.Make sure "/usr/local/bin" is at the front of your search path in ~/.profile or ~/.bashrc etc.

h.Type source ~/.profle or source ~/.bashrc etc. or alternatively, just open a new shell window. When you type which python it should give you the new version in "/usr/local/bin" not the one in "/usr/bin".

3.Download the cvs2svn-2.2.0 (or greater) source, unarchive and change directory to cvs2svn-2.2.0. Many people can't get cvs2svn to work except in the installation directory. The reason for this is that the installation places copies of cvs2svn, cvs2svn_libs, and cvs2svn_rcsparse in the /Library/Frameworks/Python.framework hierarchy. All we need to do is make a link in /usr/local/bin pointing to the location of cvs2svn in the python framework hierarchy. And for good measure we also make links to the lib and include directories: 

a.Type sudo make install

b.Create the required links by typing the following: 

	sudo ln -s /Library/Frameworks/Python.framework/Versions/2.6/bin/cvs2svn /usr/local/bin/cvs2svn

	sudo ln -s /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6 /usr/local/lib/python2.6

	sudo ln -s /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 /usr/local/include/python2.6

参阅上面的方法解决。

2)运行CVS2SVN转换库的时候,命令参阅附件,在pass5 cvs revision summaries时运行缓慢

这个问题耗了我很长时间,转换了一天一夜,sort.exe还在那不停的执行。查阅了所有的网上记录都没有解决方案。

解决方案如下:

在http://unxutils.sourceforge.net/UnxUpdates.zip地址下载UnxUpdates.zip,用里面的sort.exe替换附件中提到的sort.exe,问题解决。

3)运行工程中出现系统用户无法读取某个版本或者branch的错误:

解决办法如下:

 

修改CVSROOT里的config文件把SystemAuth=no 改成 SystemAuth=yes

       

成功转换结束。

如果该篇文章对你有用的话,请留下你的留言。

猜你喜欢

转载自zzxanadu.iteye.com/blog/690400
今日推荐