« More Non-Tech Weblogs Please | Main | Midnight Run to Apple Store Nets 14" iBook and More »

August 13, 2004

Laying off Branching in CVS

We used to do a lot of branching our CVS tree. In fact, every time we did a release we branched. Sometime in the late spring, in a developer meeting we decided to stop the branching madness and move to non-branching tags.

We used branching because we needed a snapshot of the code at a certain time, but it's overkill. Branching not only gives you a snapshot, it gives you the ability to make changes on those files, separate from the main trunk. We realized that we really had no need to make changes to the branched files and that we could save some work by just tagging the code. Now, when we're ready to release some code we do a tag of the code:

cvs rtag <tag> <module>

If changes need to be made before the release goes out the tag on a file can be moved up to a newer version:

cvs tag -r <new version> -F <tag> <file>

We're somewhat soft about changes made after a release. If the change is minor and on the same day we usually move the tag up. If the changes are more major, or if some time has passed we do a delta release, tagging based on the most recent minor release.

We haven't forgotten about branching, we're reserving it for cases where a module might need to be maintained for production at the same time major development is going on. This seems like a more sane use of branching.

Ahh, the things you learn with experience. Of course the only reason I write is because I got tired of looking up the CVS command for moving a tag.

Posted by mike at August 13, 2004 1:38 PM