Bill Mill web site logo

Converting Sourcesafe to Subversion

One of my first tasks at my new job was to convince them that they needed to switch away from sourcesafe and onto something better. We talked about SourceGear Vault, but we decided it was too expensive and didn't have the community support that subversion had.

Because my team had already switched off of subversion and onto sourcesafe before I and another developer started working, it was a bit of an uphill struggle to get them to agree to the change. Fortunately, after filling up several long wiki pages of discussion between team members, I wrote up a detailed comparison of the three options under consideration. It must have been convincing, because almost immediately after I wrote it, the team agreed to try subversion again.

Since I had fought so hard for the switch, I became the one responsible for the switchover and future maintenance of the subversion repository. I was scared that switching was going to be extremely difficult, due to the closed nature of sourcesafe, but was pleased to find vss2svn, a utility to run the conversion for me. Despite the fact that it's in perl (ha ha), it runs very nicely, and converted my repository with no loss of change history into a subversion dump file.

The only issue I had with vss2svn is that once you've converted all your code into subversion, your *.*proj and *.sln files still have sourcesafe crap inside them, and when you try to open them, Visual Studio complains. Furthermore, there are lots of *.scc files, which are sourcesafe lock files, scattered throughout your projects.

To fix this, I wrote a little python script which will go through your project directories, cleaning up all the leftover junk. It deletes all *scc files, and goes into all *proj, *.vdproj, and *.sln files and cleans them out.

To use it, simply drop it at the root of a working copy of your new subversion repository, cd to that directory, and run the script with "python clean_up_sourcesafe.py". The only thing you should be careful about is that the file will run recursively for all folders below its current working directory. I can't guarantee that it'll work for you, but I will say that it's worked for me through several test conversions.

Good luck with your conversion, I hope it makes you as happy as it makes me :)