Home
Branching
Creating a branch is useful when you want to maintain multiple streams of the software being developed or supported and when they are in different stages of delivery (usually development and production support).
The scenario demonstrated here is that a particular release has been deployed to the production environment, and a new project has started to enhance the application. In addition to this, the existing production release has to be maintained so that problems identified are fixed quickly. Branching provides the mechanism to achieve this and the following example outlines how this might be done.
Perform the following steps for the first workspace for cvsuser1:
![]()
In the Enterprise Explorer of the Web perspective, right-click RAD75CVSGuide and select Team Æ Tag as Version. Type BRANCH_ROOT in the tag version field, and click OK.
![]()
Right-click RAD75CVSGuide again, and select Team Æ Branch.
![]()
In the Create a new CVS Branch dialog (Figure | 8-36), enter Maintenance as the branch name and BRANCH_ROOT for the version name. Verify that Start working on the branch is selected so that the workspace automatically sets itself up for development on the new branch. Click OK.
![]()
Figure 28-36 Creating a new CVS Branch
Attention: Remember the version name entered here, as it is important. It identifies the point at which the branch was created and is required later when the branches are merged.
![]()
Right-click RAD75CVSGuide, select Properties, and select the CVS tab. A view is displayed with the tag name displayed as Maintenance (Branch). This indicates that the project is now associated with the CVS Maintenance branch and any changes checked in go to that branch (Figure | 8-37).
![]()
Figure 28-37 Branch information for a project in the local workspace
![]()
Open the CVS Repository Explorer window by clicking Window Æ Open Perspective Æ Other Æ CVS Repository Explorer.
![]()
Right-click the repository and click Refresh View.
![]()
Expand the tree to verify that the branch has been created in the repository (Figure | 8-38).
![]()
Figure 28-38 List of branches
ibm.com/redbooks