I have to say, I know a lot of developers who aren’t exceedingly impressed with Microsoft Visual Sourcesafe. Most people acknowledge that it is a pretty basic source control system, and really only any good for simple projects. Having said that, I’ve used it for over ten years, since before it was a Microsoft product. (The package was originally produced by One Tree Software, founded in 1992, and then taken over by Microsoft in 1994. You can read a blog entry by one of the original three people who set up One Tree, and went to Microsoft here.) Aside from a big disaster with a database with an early version, I’ve not usually had too much problem with the product. Certainly with the more recent versions, although I knew people who had encountered problems, for the sort of basic source control stuff I was doing, it had been reliable, until today.
The problem I had today came about as a result of us having to move our SourceSafe database. This should be a relatively straightforward process, as a SourceSafe database is basically just a collection of files. Anyway, the problem was that the database didn’t copy cleanly, failing on 37 files, that for some reason it couldn’t copy.
On that basis, I thought I’d use the SourceSafe database analysis tool to see if there were any problems – which produced several pages of files that were apparently corrupt, and suggested that I run the analysis in fix mode, to fix the problems.
So following the instructions, I ran the fix, and this claimed to fix the problems, so I tried the copy again, and it managed to copy everything.
At this point we opened up the database in SourceSafe, and started spotting problems. Amongst a catalogue of problems we had files and projects totally missing, whilst others had the wrong files in them. All in all it was a total nightmare, the tool you rely on to keep your work secure had basically scrambled it. The most recent backup was from Tuesday, so currently we have the backup, alongside the semi-corrupt database.
Anyway, at this point I had a look around the web, and came across an interesting article on SourceSafe defects, and some pages on SourceSafe internals which made interesting reading when reviewing some of the things that had been done to our SourceSafe database over the past year or so. Having read some of those, I’m amazed we didn’t have problems sooner.
So, I have to say that my opinion of SourceSafe has definitely got worse, and the key mantra when using it is to not try to be clever. Particular techiniques to avoid are deciding to restructure you source tree part way through a project, and trying to generate new project release trees using branching and sharing.
Having said that, it is worth bearing in mind that the current version of SourceSafe that is used with Visual Studio 2003, is a patched version of the version that shipped with Visual Studio 6, a good few years ago – however this year it is finally being updated, with a new release, plus a new big brother, Team System. Hopefully as a result of today things will be put in motion to upgrade to something where the repair tool doesn’t make the problems worse!!!!