Visual Source UnSafe

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!!!!

2 thoughts on “Visual Source UnSafe”

  1. Now we do have to be fair about the setup of SourceSafe at our company as the one which you are referring to was not setup in as per recommendations.

    The database files can sit on central storage as long as there is long as there is a dedicated administration client looking after it. Without it the job falls down to the clients.

    The clients are designed to work in a single user mode and therefore aren’t all that cool with shared files.

    The database analysis tool works best when … no one is user the database ! I have always found the best way to do this is, copy the files off to another location and perform the analysis on them there.

    Anyway, give me a shout if you need a hand, I have got my VSS wings!

  2. Worth pointing out that all of the above was carried out with everybody else locked out of the database, hence why it was particularly annoying that it made a mess of things!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.