Nov 18 2008
Visual SourceSafe to SVN migration.
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:
<add key="VSSWIN32" value="C:Program FilesMicrosoft Visual SourceSafe"/> <!-- # VSSWin32 directory which contains ssapi.dll--> <add key="VSSDIR" value="d:VSS"/> <!-- #VSS repository directory (contains srcsafe.ini)--> <add key="VSSPROJ" value="$/RegionCreator/"/> <!-- #VSS project to start at (ie $/Product)--> <add key="VSSUSER" value="<user>"/> <!-- #User to use for VSS commands, use blank for none--> <add key="VSSPASSWORD" value=""/> <!-- #password to use for VSS commands, blank is OK--> <add key="SVNUSER" value="<computer_name><user_name>"/> <!-- #User to use for SVN commands, use blank for none--> <add key="SVNPASSWORD" value=""/> <!-- #password to use for SVN commands, blank is OK--> <add key="SVNURL" value="file:///D:/Svn/RegionCreator"/> <!-- #URL to use for the root of the check in--> <add key="SVNPROJ" value="trunk"/> <!-- #SVN project to start at (ie $/Product)--> <add key="SVNREVPROPSPATH" value="d:Svndbrevprops"/> <!-- #SVN Repository directory (ends in [RepositoryName]dbrevprops)--> <add key="WORKDIR" value="c:Tempvss"/> <!-- #Directory under which files and directories will be created as work progresses--> <add key="DEBUG" value="1"/> <!-- #turn on debug output, blank is OK--> <add key="AUTORETRY" value="1"/> <!-- #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 “dbrevprops” 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? :)

