Version Control Comments and Rant

Version control is any sort of system for dealing with different points in an edit cycle of something. To narrow this post, I’m only really looking at formal version control systems (meaning a strategy of hand made zip files and email might work for you but won’t be discussed here). I’m also not going to claim to be anything of an expert on this topic and have merely had some experience with a small number of systems, so I’ll try to keep it short.

There are two major flavors of version control systems: the standard system with a single repository you check out and commit against (like Subversion) and distributed version control systems where a repository is copied, locally modified, and merged back to the original later (like Git). The former offers a simpler approach to the entire system. Though you can set up some very unique systems with further customization of subversion like taking advantage of externals, the general formula is to have people modify files from where they checked out (which can just be parts of the tree) and then check them back into the tree, resolving conflicts as they arise. In a lot of situations this works perfectly. It suffers from a large problem in my mind though: revisions on code that isn’t done. Because there is only a single repository in the traditional set up, you _should_ only commit code when it’s done and ready. This means that until that point, you should just keep your code on your machine. If it’s a personal repository, it doesn’t matter, but public projects should not have bad code in the public repository (knowingly).

This is where something like git can make everything better. By having a local copy of the repository, you are able to commit your changes, revert back, and so on without modifying the public facing repository. When your modifications are done, you simply push your repository back to the origin (or alternatively have someone who maintains everything clone your branch and merge both yours and the master branch). The result should be that you get to keep revertable changes locally without messing up the public repository. There are also many other features to version control systems, but these are the most important for my rant.

My rant is about WordPress. I’m not going to call their code good, but I will say that their product works rather well and is very feature rich. I also (generally) run the subversion build. I’m not right now because as of the last revision I got (10786), someone checked in code that was syntactically wrong (like would not parse). I admit, it was just for ajax stuff, but I still find that rather unacceptable that essentially non-compiling code was pushed into a public facing repository. I reverted to the nightly build easily enough, but this could have been easily avoided. One can even use a subversion backend and git locally to have local revision that git then pushes back to subversion as needed.

2 Comments

Post a Comment

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