Home

 

Branches in CVS

Branches are a source control technique to allow development on more than one baseline in the repository.

In CVS, the HEAD branch always refers to the latest or current work that is being performed in a team environment. This is only sufficient for a development team that works on one release, which contains all the latest developments, including major enhancements and bug fixes. The real-world situation is usually that at least two streams are required. One main stream to manage the development, and a maintenance stream for the version that is in currently production. This allows new versions of the production build to be created without fear of being affected by the changes made to the main development stream. This scenario is when branches can be useful and where CVS baselines and parallel streams of work should be created.

At some point the development and maintenance streams have to be merged together to provide a new baseline to be a production version. This process ensures that any fixes or enhancements made in the maintenance stream make it into the development stream. This is known as a merge, and the CVS tools within Application Developer provide features to facilitate this process. A representation of this is shown in Figure | 8-35.

Figure 28-35 Branching with two streams

ibm.com/redbooks