Saturday, July 5, 2008

SourceSafe Issue - Files were moved

So, I sat down an my dining room table this morning with my laptop, all set to get some work done. I connected to the VPN and opened up Visual SourceSafe because I needed to see about some changes that someone else was working on with one of our projects. To my shock and disbelief, there was nothing there. And by nothing, I mean nothing. VSS showed no projects at all.

I connected into the server via Remote Desktop to see if I could figure out what happened. I looked at the folders where the VSS database is stored, and it seemed to be in order. So, I ran analyze.exe to see if there were any corrupted files or whatever. This is where it started to get interesting... Analyze.exe wouldn't consistently run without crashing with nothing more than a very not-helpful Visual C++ Runtime error. GAH!

I rebooted the server and ran analyze.exe again. Same crashing! I ran it again, and noticed that it was indicating a whole bunch of files that it couldn't find, all of which were in the same folder. That folder on disk was indeed empty.

After nearly 3 hours or trial and error, rebooting, Google searches, and IM sessions, it occurred to me that if the folder in question had been moved for whatever reason, it might be causing the symptoms I was seeing. So, I started looking through the rest of the folders in the VSS 'data' directory, and sure enough, the 'A' folder had been moved to inside the 'E' folder (you have to have seen how VSS stores it's files for that to make sense). So, I copied the contents of this misplaced 'A' folder back to the correct 'A' folder (data\A), and ran analyze.exe again. This time it ran properly, and was able to correct a few other minor issues! Woot!

So, I opened Visual SourceSafe back up, and sure enough, everything was back to normal. Too bad it took me 3 hours on a Saturday morning to figure it out...

No comments: