Working with Branches in CVS

See Also

The IDE's CVS support enables you to maintain different versions of an entire code base using branches. Branches are created by attaching a branch tag to a file or folder in the repository. When you modify files in a branch it does not affect the files in the main code line or "trunk". You can, however, merge any modifications you make in the branch back to the trunk at a later stage.

Checking out Branches

If you need to edit files on a branch that already exists, you can check out the branch to copy the files to a local working directory. You must, however, create a new local working directory within which to checkout the branch.

To check out a branch to a local working directory:

  1. Choose Versioning > CVS > Checkout from the main menu.
  2. On the first page of the CVS Checkout wizard, specify the location of the CVS repository by choosing a preconfigured URL from the CVS Root drop-down menu. If you are unfamiliar with the syntax, click the Edit button and enter the required information in the Edit CVS Root dialog.
  3. Enter your repository password in the Password field.
  4. If you are using a proxy, click the Proxy Configuration button and enter the required information. Click Next.
  5. On the Module to Checkout page, specify the files and directories you want to check out in the Module field or click the Browse button to choose from a list of all modules in the repository.
  6. Specify the branch, revision number, or tag to checkout in the Branch field or click the Browse button to choose from a list of all branches in the repository.
  7. Specify the local working directory into which you want to check out the selected branches. Alternately, you can click the Browse button to navigate to the desired directory on your system.
  8. Click Finish to check out the files. The IDE initiates the checkout command for the branch. The IDE's Status bar, displaying in the lower right corner of the IDE, indicates the progress of the files downloading from the repository branch to your local working directory.

Switching to a Branch

If you want to switch a project, directory, or file to a branch that already exists for stabilization or experimentation purposes, you can do so using the Switch to Branch command.

To switch to a branch:

  1. In the Projects, Files, or Versioning window, right-click the file or folder you want to be the root of your branch and choose CVS > Switch to Branch.
  2. In the Switch to Branch dialog, enter a Branch name or click Browse to see a list of available branches.
  3. Click Switch. The IDE moves the selected file to the specified branch by adding a branch tag.

Creating a Branch

If you want to work on a separate version of your file system for stabilization or experimentation purposes, you can do so by creating a branch. Branches are created by adding a branch tag to a project, directory, or file revision.

To create a branch:

  1. In the Projects, Files, or Versioning window, right-click the file or folder you want to be the root of your branch and choose CVS > Branch.
  2. In the Branch dialog, enter a Branch name or click Browse to see a list of available branches.
  3. If you want to tag the file or directory, select the Tag Before Branching checkbox and enter a Tag name.
  4. If you want to switch to the new branch after creating it, select the Switch to This Branch Afterwards checkbox.
  5. Click Branch. The IDE creates the branch by adding a branch tag to the selected file or directory.

For more information on working with branches, see the CVS documentation at:

See Also
Merging File Revisions from a Branch
Updating Files in a Local Working Directory
Resolving Merge Conflicts

Legal Notices