Working with CVS branches
Working with CVS branches
Changelog:
- 
    2015-03-17: Don't move update tags; use new tags for each update. 
Introduction
These instructions cover current best practice on how to maintain CVS branches.
The following tag conventions are used:
| Tag | Purpose | 
|---|---|
| branch-base | Branch point off head | 
| branch-baseITERATION | ITERATION update from HEAD since branch-base. Different conventions exist for ITERATION, including incrementing serial number, or using a YYYYMMDD date. | 
The following shell variables are used:
| Variable | Purpose | 
|---|---|
| ${branch} | Branch name | 
| ${module} | CVS module | 
| ${old} | Old (previous) update/merge tag | 
| ${new} | New (current) update/merge tag | 
To create a branch
- 
    Tag the set of sources you want to branch with a command like: cvs rtag -r HEAD ${branch}-base ${module}This tag represents the original branch point and will not be moved during the lifetime of the branch. 
- 
    Branch them with the command: cvs rtag -b -r ${branch}-base ${branch} ${module}
Update the branch to reflect changes in HEAD
- 
    Update your working source tree to be on the branch: cvs update -P -r ${branch}(in your working source tree) 
- 
    Determine appropriate values for the variables containing the tag names used for syncing the branch. The existing tags for the branch can be determined with: cvs status -v somefile | grep ${branch}If this is the first update, use: ${old}${branch}-base${new}${branch}-base1If this is a subsequent update, use: ${old}${branch}-baseCURRENT${new}${branch}-baseNEXT
- 
    Make a tag which represents the new base you're moving to: cvs rtag -F -r HEAD ${new} ${module}
- 
    Merge changes between the old and new base of your branch: cvs update -j ${old} -j ${new}(in your working source tree) 
- 
    Merge conflicts, etc. 
- 
    Check in your changes (to the branch). 
