不评论孰优孰劣,反正就有这样的需求,也能够做到。
工具的名字叫做: VSSMigrate (for windows)
网上同名的工具不少,下载起来也有点困难,搞不定的同学可以写邮件问我要。 (真是非常的抱歉,我的拷贝已经遗失了,陆续不少朋友来找我要,只能是对不起大家了)
简单说下步骤:
1、工具是不需要安装的,一共就两个文件,一个exe一个ini复制到某个地方就好
2、配置一下那个ini文件,文件中有不少注释,认真看注释的同学一般不会配置错,我后面也会给个sample,唯一需要注意的是临时文件夹要事先建好
3、打开命令行,执行那个exe并指定ini文件,然后——等
几个附加说明:
1、VSS是没有Change Set概念的,所以工具是逐文件,逐版本建立Change Set的,Convert之后的Change Set数会比较夸张。
2、有些特殊的符合貌似会产生不兼容的问题,我就发现一个“~”,含有"~"符号的文件夹没有被Convert。
3、要超级有耐心才行啊,我迁移了一个最后形成9000个Change Set的VSS库,花了整整一个晚上,期间可千万不要有人去操作VSS或者SVN。
4、准备好足够的硬盘空间,并且不要心疼硬盘。我一开始心疼硬盘(其实主要是怕IO错误),用计算机内存虚拟了一个目录作为临时目录,结果“空间不足,程序爆掉,从头来过”,哭啊。
1 [Settings]
2 VSSWIN32=C:\Program Files\Microsoft Visual Studio\VSS\win32
3 # VSS\Win32 directory which contains ss.exe
4
5 VSSDIR=\\path\to\vss\share\folder
6 #VSS repository directory (contains srcsafe.ini)
7 #use environment variable SSDIR to set the current repository.
8
9 VSSPROJ=$/path/to/project
10 #VSS project to start at (ie $/Product)
11
12 VSSUSER=
13 #User to use for VSS commands, use blank for none
14
15 VSSPASSWORD=
16 #password to use for VSS commands, blank is OK
17
18 SVNWIN32=C:\Program Files\Subversion\bin
19 # SVN\bin directory which contains svn.exe
20
21 SVNUSER=
22 #User to use for SVN commands, use blank for none, use quotes for two names
23
24 SVNPASSWORD=
25 #password to use for SVN commands, blank is OK
26
27 SVNURL=http://path/to/svn/repo
28 #URL to use for the root of the check in
29
30 SVNPROJ=svn/project/folder/name
31 #VSS project to start at (ie $/Product)
32
33 WORKDIR=D:\path\to\temp\folder
34 #Directory under which files and directories will be created as work progresses
35
36 DEBUG=1 #turn on debug output, blank is OK
37 AUTORETRY=0 #if a command fails to run, it will be run automatically 1 time before failing
38
2 VSSWIN32=C:\Program Files\Microsoft Visual Studio\VSS\win32
3 # VSS\Win32 directory which contains ss.exe
4
5 VSSDIR=\\path\to\vss\share\folder
6 #VSS repository directory (contains srcsafe.ini)
7 #use environment variable SSDIR to set the current repository.
8
9 VSSPROJ=$/path/to/project
10 #VSS project to start at (ie $/Product)
11
12 VSSUSER=
13 #User to use for VSS commands, use blank for none
14
15 VSSPASSWORD=
16 #password to use for VSS commands, blank is OK
17
18 SVNWIN32=C:\Program Files\Subversion\bin
19 # SVN\bin directory which contains svn.exe
20
21 SVNUSER=
22 #User to use for SVN commands, use blank for none, use quotes for two names
23
24 SVNPASSWORD=
25 #password to use for SVN commands, blank is OK
26
27 SVNURL=http://path/to/svn/repo
28 #URL to use for the root of the check in
29
30 SVNPROJ=svn/project/folder/name
31 #VSS project to start at (ie $/Product)
32
33 WORKDIR=D:\path\to\temp\folder
34 #Directory under which files and directories will be created as work progresses
35
36 DEBUG=1 #turn on debug output, blank is OK
37 AUTORETRY=0 #if a command fails to run, it will be run automatically 1 time before failing
38