After struggling with VSS for quite some time I decided to switch to SVN with all my private projects. I have used SVN before and I think it is great, but never had enough time to migrate all the projects. I thought that such an operation could not be painless. History of all changes was crucial for me - I did not want to devote all those information held by VSS just because of the migration. I started looking for some kind of script I could use... and I was very lucky, because almost immediately I found the solution that did all the work for me. VssMigrate is a command line C++ utility developed by a bunch of folks (y
ou will find all the info on the utility site). At the project page one will find a bunch of releases (bug fixes, additional features...) - personally I think the best idea is follow author's advice and download one of the latest (the one with 'tim2' suffix seems to be the latest one - it automatically removes VSS bindings). VssMigrate seems to be quite mature and as much developer-friendly as could be - the only thing one has to do is to configure this tool by editing .config file. It did take me, however, a couple of minutes to configure it properly, but when I figured out the proper values... the migration was quick as lightning. Below you may find configuration that worked for one of my projects:
1 <add key="VSSWIN32" value="C:\Program Files\Microsoft Visual SourceSafe"/>
2 <!-- # VSS\\Win32 directory which contains ssapi.dll-->
3 <add key="VSSDIR" value="d:\VSS"/>
4 <!-- #VSS repository directory (contains srcsafe.ini)-->
5 <add key="VSSPROJ" value="$/RegionCreator/"/>
6 <!-- #VSS project to start at (ie $/Product)-->
7 <add key="VSSUSER" value="<user>"/>
8 <!-- #User to use for VSS commands, use blank for none-->
9 <add key="VSSPASSWORD" value=""/>
10 <!-- #password to use for VSS commands, blank is OK-->
11 <add key="SVNUSER" value="<computer_name>\<user_name>"/>
12 <!-- #User to use for SVN commands, use blank for none-->
13 <add key="SVNPASSWORD" value=""/>
14 <!-- #password to use for SVN commands, blank is OK-->
15 <add key="SVNURL" value="file:///D:/Svn/RegionCreator"/>
16 <!-- #URL to use for the root of the check in-->
17 <add key="SVNPROJ" value="trunk"/>
18 <!-- #SVN project to start at (ie $/Product)-->
19 <add key="SVNREVPROPSPATH" value="d:\Svn\db\revprops"/>
20 <!-- #SVN Repository directory (ends in [RepositoryName]\db\revprops\)-->
21 <add key="WORKDIR" value="c:\Temp\vss"/>
22 <!-- #Directory under which files and directories will be created as work progresses-->
23 <add key="DEBUG" value="1"/>
24 <!-- #turn on debug output, blank is OK-->
25 <add key="AUTORETRY" value="1"/>
26 <!-- #if a command fails to run, it will be run automatically 1 time before failing-->
Thanks to the comments, and sample values - editing config file was not such a big hassle as I was expecting. Just to make it even clearer - I will describe some properties that may not be obvious at the beginning:
- [line 5] "VSSPROJ" should hold internal path of a project inside VSS.
- [line 19] "SVNREVPROSPATH" should point into "db\revprops" that is located right under the folder when SVN repository was created
- [line 21] "WORKDIR" is a temporary directory used during the migration process. The directory must exist before running migration utility.
And at the end... it is a good idea to remove source control bindings before releasing your sources, right? And why do it manually if there is another great tool that does all this work? :)


No comments:
Post a Comment