Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×

You Need Version Control

Almost anyone who works with data files--program code, drawings or manuals--needs version control.

How often have you accidentally deleted or changed something you were working on and wished that you could un-make that change? Have you ever stared at a line of text in a collaborative project and wondered who exactly wrote that, and when?

Almost anyone who works with data files–program code, drawings or manuals–needs version control. One solution is to make a copy of everything before it gets worked on. Using that tactic, however, you may not know who’s to blame when a problem gets introduced, or exactly how old a folder labeled “Latest” is.

Fortunately, there is a free system called CVS (Concurrent Versioning System) that automatically maintains versions of a file. This system eliminates the need to indicate a date in the file/folder name; that kind of “meta-data” is handled internally by CVS.

With a file in CVS (www.cvshome.org), all changes are logged and reversible. If a user makes a change, they are prompted for a log entry and their name is stored along with the change. It is a simple matter to see all changes that have been made (and by who and when) back to a file’s creation. Likewise, any of these revisions are instantly available for retrieval.

CVS works well on a local network and, with compression turned on, works well enough over the Internet. A user doesn’t need to be continuously connected to the CVS server. She simply checks out the needed files, takes them on the road, then at the end of the day “commits” the changes (publishes the changed files back to the CVS server) via the Internet.

The “Concurrent” portion of the CVS name means that multiple developers can work on the same text file at the same time. CVS will merge the changes (and prompt the user if there are any problems) before the file is committed. The first time I experienced its concurrent capabilities was in a large AMX program. We had five programmers working on the program simultaneously! Each programmer would own a bug-list item, fix it, then “commit” the change into CVS. It was awesome to watch full blocks of code simply appear in the files.

It’s not all wine and roses with CVS, however. There is no clean way to rename or relocate a file or folder. There is also no good way to support multiple servers, for instance, with a second office location all users would have to use the same physical server. Binary files, such as JPG images, present CVS with another difficulty, as it can not automatically merge changes, only one person can work on the file at a time.

If you use UNIX servers, CVS is probably already installed. If you are using Windows servers, you will want to use a product known as CVSNT (www.cvsnt.org) on the server. CVSNT (CVS for NT) is a bit of a misnomer as it will actually run on every Windows OS from Windows 95 up to Windows 2003; it has even been ported back into Linux. You’ll want to avoid running on Windows 95/98/ME and stick to the NT/2000/XP/2003 line. The two best clients on Windows are TortoiseCVS (www.tortoiseCVS.org) and WinCVS (www.winCVS.org).

The TortoiseCVS project has the byline of “Enjoyable Version Control” and it is just that. Tortoise is my favorite client. It strips away the complexity of CVS and presents a simple interface that is well integrated into Windows.

Working with Tortoise is a breeze. The most used CVS commands are available by simply right-clicking on a file or folder.

For those looking for more advanced control, WinCVS supports every last CVS feature available, including lock management and notifications. WinCVS does not integrate into Windows Explorer; to perform any operation or to see the status of a file, you have to run the WinCVS program. Tortoise is easy, WinCVS is thorough.

Every program I mention here is Open Source and free software, meaning you are free to install it and free to do with it what you please. The software is owned by no one company, and is maintained by a group of dedicated developers, with support available.

Axiom has been using CVS now for more than a year, and it’s difficult to imagine life without it. If you don’t already have a version control system, I recommend that this is the year you take control.

Ian Epperson is principal technologist for Axiom Design in Pleasanton, California.

Close