Removing unnecessary baselines

About this task

To remove an unnecessary baseline, first mark it for deletion. Once marked, you can set up the Save Offline and Delete command to automatically delete baselines that are marked for deletion when they are no longer used.

The following steps show you how to mark a baseline for deletion. (The soad Command enables you or the CM administrator to delete the baselines you have marked.)

Procedure

  1. Find the baselines that you want to remove.

    Find > Baselines

    The Query dialog box appears.

  2. Set the query criteria and then run the query.
    1. Set For Release to the appropriate release.
    2. Click the plus sign to add another property to the query.
    3. Set With Purpose to Integration Testing.
    4. Run the query by clicking .
  3. Mark the unnecessary baseline for deletion.

    Choose all baselines that you want deleted, then right-click and select Delete.

    The Delete dialog box displays the selected baselines. Click Delete. The selected baselines are now marked for deletion.

    Note that an update operation will not select a baseline that is marked for deletion. If your team uses project groupings, and any of the project groupings are using marked baselines, they will choose different baselines during the update operation.

    The CM administrator can set up the Save Offline and Delete command to automatically delete baselines that are marked for deletion when they are no longer used. For details, see the soad Command.

    Additionally at this point, your site might decide to inactivate the release you have just finished. Use the ccm clean_up command to clean out the process rules and any old releases from the release.

    There is not much overhead associated with retaining these extra releases and process rules; clean up is for convenience. Cleaning out the releases and the process rules makes it easier to find the information you need in the corresponding dialog boxes.

    Additionally, you cannot delete a baseline if a project grouping uses that baseline, or if a process rule uses the baseline. If you try to delete a baseline and its checked-in projects and products, and one or more of its associated projects or products is a member of a project that is not part of the baseline, the delete baseline operation will succeed; however, those projects or products will not be deleted. Furthermore, if one or more projects that are in the baseline are members of another baseline, or are baseline projects, the delete operation will be successful, but those projects will not be deleted.

    Note that you will need to remove obsolete project hierarchies, and then empty project groupings, before you can delete old baselines. However, empty project groupings may still carry important information about tasks the owner explicitly added to or removed from that grouping.

    To find and remove empty project groupings that also have no explicitly added or removed tasks, use the following commands:

    ccm set role ccm_admin

    ccm query –t project_grouping "is_no_project_grouping() and has_no_added_task_in_pg() and has_no_removed_task_in_pg()"

Results

ccm delete @Mark a baseline for deletion

A baseline marked for deletion can be deleted later with save offline and delete (SOAD), or manually.

Procedure

  1. Be sure your role is set to build_mgr.
  2. Display a list of baselines for the appropriate release and purpose of the baseline that you want to transition.

    > ccm baseline -list -releaseccm baseline -list -release release -purpose "purpose spec"

    Find the test baseline that you want to transition. Note the complete baseline name. You’ll use this in the next command for the baseline_spec.

    Before you publish your baseline, you might want to rename it or change the versions on the baseline projects or products. For example, if this is the baseline for Release CM/6.4 Turn 10, you might want to change the name of the baseline to 6.4 Turn 10, or you might want to change the versions on the baseline projects and products to 6.4_T10. You can also add a build number to the baseline, if it doesn't already have one.

    Rename your baseline from 20050502 to 6.4 Turn 10, change its build number to 1234, and change the versions of its projects and products to 6.4_T10, use the following command:

    ccm baseline -modify 20050502 -n "6.4 Turn 10" -build 1234 -versions
    -vt "6.4_T10"

    If you have multiple projects with the same name, for example, for multiple platforms, you'll need to use a version template with variables. For example, the following version template will cause all projects that have a platform attribute to have their version changed to platform_release_T10, and any projects that don’t have a platform attribute to have their version changed to release_T10:

    > ccm baseline -modifyccm baseline -modify 20050502 -versions -vt
    "%{platform:-}%{platform:+_}%{release}_T10"

    Alternatively, you can use a version template that uses the variable, %version, if you want to prepend or append a string to the project and product versions that you're already using in your baseline projects:

    > ccm baseline -modifyccm baseline -modify 20050205 -versions -vt "%{version}_%{release}_T10"

Results

Note: If you use variables in your version template, be sure to enclose the version template string in quotes, as in the above examples. If you don’t, your shell might try to expand it, thinking it’s an environment variable.
Note: If any of the projects in your baseline have work areas that are not visible, you will need to execute this command separately on each computer where the work areas are visible. You will also need to use the
-skip_nonvisible_projects option to skip those projects whose work areas are not visible on the current computers. This might happen, for example, if you have a baseline that includes both Windows and UNIX projects.

Feedback