Tool Mentor: Adding Elements to Source Control Using Rational ClearCase
This tool mentor describes how to add elements to source control using Rational ClearCase.
Tool: Rational ClearCase
Related Elements
Main Description


At the core of ClearCase are its extensive capabilities to control and manage versions of elements such as source files for software and documentation, directories, reports, and so on. Before you can check out one or more elements, you must first bring the initial version of these elements to source control.

Tool Steps

The following steps are performed to add one or more elements to source control using Rational ClearCase:

Start the ClearCase Explorer To top of page

  1. From the Start menu, click Programs > Rational Software > Rational ClearCase > ClearCase Explorer
  2. Select the view that points to the VOB in which you want to add the element(s) to source control.

  3. If the view does not exist, you must first create it. If the view exists, but you do not see the VOB, you must first mount the VOB that will contain the element(s).

Navigate to the element(s) to be put to source control

We recommend that you select the elements that are the farthest from the root directory tree. For any given element, ClearCase also adds any parent directories (up to the VOB root directory) that are not yet under source control.

Note: Before you add an element to a VOB, its parent directory must be checked out to your view. If it is you haven't done so already, ClearCase checks it out before creating the element and checks it in after creating the element.

Select the element(s) To Tool Steps

  1. You can select one or more elements to be put under source control using the standard selection methods.

Add the elements to source control To Tool Steps

  1. Right-click the selected files and and select Add to Source Control from the pop-up menu.
  2. To add elements to a Unified Change Management (UCM) project, in the Add to Source Control dialog box, select or create a ClearCase activity.
  3. In the Comment box, describe the elements you are adding to source control.
  4. To continue working on the new elements after you add them to source control, select the Checkout after adding to source control option. To leave them checked in, clear the option.
  5. If you are working in a replicated VOB (MultiSite) and you are not using a UCM view, you can make your current replica master any branches created during the Add to Source Control operation by selecting the Make current replica the master of all newly created branches option. After the element is created, you will be able to create new versions of the element on any of the new branches.

  6. If you do not select this option, mastership of the element's main branch is assigned to the replica that masters the main branch type. If the master replica is not your current replica, you will not be able to create any new versions on the branch. Also, if your Config Spec contains auto-make-branch rules, creation of the branches fails if the branch types are not mastered by your current replica.

Complete the source control operation To Tool Steps

Complete the operation as follows:

  1. To add only one element to source control, click OK.
  2. To add multiple elements to source control and apply the same comment and Checkout to all elements, click Apply to All.
  3. To cancel the operation, click Cancel. The elements will not be put to source control and remain view-private files.

More Information To Tool Steps

See the following manuals for more information about adding elements to source control using Rational ClearCase:

  •  book icon  Managing Software Projects
    • Chapter: Setting Up the Project

  •  book icon  Developing Software
    • Chapter: The UCM Workflow
    • Chapter: Finding and Setting Activities
    • Chapter: Working on Activities
    • Chapter: Other Development Tasks