Thursday, November 15, 2007

Vault

Up until recently, I have been opposed to source-code management tools. A source-code management tool is used by groups of programmers working on a single project.

Without source control, the project is divided up into files and a single person is given the responsibility for that "file." That is not to say that a single person will do all of the work on a file but a single person is responsible for coordinating the work on that file so that someone making changes a) makes changes to the most up to date version of the file and b) doesn't over-write anyone else's changes. This system works great in small teams of responsible people but breaks down in larger or less disciplined groups.

Source control software allows the entire project to be "checked in" to a central repository. There are several versions of source control available. The simplest is the "check out" method where a single person signs out the file and works on it. While it is checked out, other people can read the original version but cannot edit it until it is checked back in. This solves both the newest version problem and the over-write problem. Unfortunately, it limits file edits to a single user at a time which can be problematic for large files or under tight deadlines.

Another common type is the edit-merge-commit model. When you want to edit a file, you get the latest version from the repository but it doesn't get locked. When you are done with the file, you check it back in. If someone else has also made changes to the file, the software shows you both versions side by side with the changes from each person highlighted. If there are no line level conflicts, you can just merge the two files together incorporating changes from both people. If there are line lever conflicts (both people edited the same section of code) you have to manually choose which changes to keep.

Recently, our group started working on the largest project we have ever attempted. All five programmers are working on the same project and, often, the same section of code. We chose to use Vault as our Version Control software and I have been slowly warming to it.

No comments: