Pragmatism in the real world

Version Control

Apart from my day-job, I also do a very small amount of freelance work, mainly for my old company. The weirdest thing about this work is that they don’t use any version control system for their websites. So far, I’ve fixed one particular bug 4 times… It’s got to the point where I keep their sites in my version control system so that I can find out which bits of my code they have broken or “lost”. It’s very odd.

That brings me to which version control system to use. To be honest, it doesn’t really matter as long as you use one! The first question is whether to pay for one or to use an opensource one. My personal choice is opensource and so I would recommend CVS or Subversion. Mainly because these are the only two I’ve used in anger over the last few years. CVS has the benefit of being well known and hence well supported. Sourceforge use it for instance. Also tools like Zend’s IDE have CVS support built in which is handy. Subversion is designed as a “better” CVS. What this means in practice is that the command line options are basically the same as CVS so it’s easy to migrate to and that they have fixed the biggest perceived problems with CVS.

In my experience, the biggest improvement in subversion (aka svn) are:

  • handles file meta data. i.e. renaming a file or directory, moving a file or directory etc is all recorded and hence history works with the new filename too!
  • Tagging and Branching is super quick!

and that’s all that I’ve noticed! To me they are awesome improvements.

If you are using CVS (like my company for instance) is it worth moving to subversion? Personally, I am not going to migrate at work yet. We don’t branch often and tag fairly infrequently, so the svn improvements there are not so big. File meta data versioning would be nice, but it’s not worth it for the cost in time and effort to migrate the company at the moment. Maybe it will be in future, but certainly not at the moment!