I use Subversion. Not because I think it is any better than any other source control system. It’s just that I have come to know it and get used to it. But I was reminded today that regardless of the source control, or version control, program you are using, it should be on a separate PC.

Yesterday morning I was doing some work and everthing was fine. I had to go out for a few hours and when I returned in the afternoon my development computer had died. I rang up my friendly PC repair guy who said it is probably the power supply, but it could be the motherboard. I left it with him and came home.

The only problem was that I had to deliver an application to a client this morning. There were some minor changes that I hadn’t finished. I was planning on finishing them yesterday afternoon, but that was now impossible. But all was not lost. I was able to grab the latest build from myh buildserver pc which holds the Subversion repository and does continuous integration using TeamCity. The latest changes that I was working on were not in Subversion. I hadn’t checked them in yet because they weren’t complete and they would have broken the build if I had.

And if I had kept the source control repository on my development machine it would have been quite safe, and I do nightly backups, things would have been different. I could have got the lastest stuff from the nightly backup, but not as easily. Stuff is the operative word. I would have had to stuff around getting it onto my laptop and then recompiling and checking that everything was OK. Probably a couple of hours work.

But this time it was easy. I had to go out first thing this morning. I got home around 9:30, had a cup of coffee, copied the latest build onto CD and had it delivered to the client by 10:15.

A separate pc hosing source control and continuous integration can save a lot of time, a lot of hassle, and probably a lot of hair.