This post has a few tips and insights from my recent experience of migrating from VSS to Subversion.
The first thing to note is that version control in SVN has some conceptual differences to VSS and it is worth spending some time reading the SVN Book to understand these differences. Understanding these differences will often give you the ‘why’ for migrating to SVN.
Why did we migrate?
Our shortlist of reasons for migrating:
- Branching in SVN is much easier than VSS.
- VSS doesn’t always play nicely when disconnected (issues with working folders)
- With SVN I can work on n individual bugs in completely separate folders, allowing me to easily work on the bugs independantly (useful for example if you are say writing a new feature against the dev source and urgently need to fix a bug in the production source). Once again VSS has ‘working folder’ issues when you work this way.
- Depending on where you store your repository, SVN plays nicely over the internet…fantastic for teams working remotely.
If you can migrate without keeping the history then that is the easiest and fastest way.It’s not ideal but you can always still get the history of a file from VSS.
Note: easiest != best.
If you want to maintain history I used this migration tool with great success.
A few things about the migration tool…
- Play with it on a mini repository first! (and remember it changes your system clock!)
- The most time consuming part of the process is when it does a ‘get history’ from VSS. Drove me nuts because you get the history with the VSS gui and you get the results almost immediately, get the history from the cmd line and it took 40-60 seconds! I did search for some cmd line switch to help but no joy.
- It’s c++ so I was too scared to make any changes and it worked fine but the source is available if you need to tweak it.
- I had some corruptions in VSS, this causes the migration tool to pause. Make a note of the file, ignore and continue.
- Depending on the size of your repo you may want to import from a logical sub project.
You will also need to do the migration on a separate dedicated machine because it changes the system clock when committing. So yes the migration tool must run on the same box as the repository it is committing to. Once the migration is complete you can either copy your flashy new SVN repo to it’s new ‘production’ home or if you have set it up with a Berkely DB then you’ll need to export and import. The SVN Book has plenty of details on ‘how’ to export/import etc.
When You are Done
I strongly recommend you run the app through a full test phase once you are done to ensure you ‘got everything’.
Point to the New Location
If you have a CI server setup you’ll need to configure to point to the new repo, same goes for you and your team members.
Maybe change the location of the old VSS repo so that no one accidentally checks in. Don’t delete it though.