====== Release engineering and methodology with CVS branching and merging ======
~~NOTOC~~
Release engineering is the collection of methods, tools and techniques for managing software product releases. Projects using CVS need to define a clear method to facilitate the addition and integration of new features. This document described my own release engineering methodology based on CVS (Heavily inspired by FreeBSD release engineering)
===== Two main branches STABLE and CURRENT =====
In order to maintain an always stable source tree. Two main branches are used. The STABLE branch and the CURRENT branch. The CURRENT branch is the CVS's default HEAD branch. The STABLE branch is created from the CURRENT branch.
New source is imported to the CURRENT branch by default. After testing the new source code in the CURRENT branch, it is merged to the STABLE branch.
===== Create a new branch for new features =====
New features that require important changes in the code are developed in a separate new branch (one branch per feature). The following rules must be followed :
* The new feature branch is created from the latest version of the CURRENT (a.k.a HEAD) branch. The CVS commands for creating a new feature branch are as follows :
cvs update -rHEAD
cvs tag FTR_FEATURE_ROOT
cvs tag -b -r FTR_FEATURE_ROOT -r FTR_FEATURE
* To work on a certain feature, the following command must be issued:
cvs update -r FTR_FEATURE
* Once the implementation of the new feature is completed and preliminary tests done, the developer can merge the new feature to the CURRENT branch.
cvs update -rFTR_FEATURE
cvs tag FTR_FEATURE_MERGE_CURRENT
cvs update -rHEAD
cvs checkout -j FTR_FEATURE_MERGE_CURRENT
* The new feature in then validated in the CURRENT branch to make sure the new changes do not conflict with other changes from other developers. Finally, the feature is merged to the STABLE branch.
cvs update -rHEAD
cvs tag FTR_FEATURE_MERGE_STABLE
cvs update -rSTABLE
cvs checkout -j FTR_FEATURE_MERGE_STABLE
===== Preparing a new release =====
If the source code is ready for a new release. Proceed as follows :
* Inform developers about the new release
* Merge pending new features from CURRENT
* After verifying that everything is ready for the release, create a tag for the new release.
cvs update -rSTABLE
cvs tag REL-X-X
\\
===== Miscellaneous commands =====
==== Removing a branch tag : ====
cvs tag -d -B BRANCH-TAG
==== Removing revisions ====
cvs admin -o 1.6.4.1:1.6.4.5 file.c
===== Useful links =====
* http://www.embedded.com/columns/technicalinsights/52601857
* http://www.usdoj.gov/jmd/irm/lifecycle/table.htm
{{tag>coding howto project-management}}