IBM Support

About removing objects in UCM environments

Question & Answer


Question

What general guidelines and restrictions should you following when removing objects in IBM® Rational® ClearCase® UCM (Unified Change Management)?

Answer







Overview

It is expected that the need will arise to remove UCM objects, whether that be a component, baseline or even the entire project. However, to ensure the stability of the UCM environment and to minimize any unexpected fallout, there are guidelines and restrictions depending on the action you are looking to execute.

Note: The restrictions are enforced within UCM (when attempting to execute a remove operation) through informational error messages explaining why an object cannot be removed. In some cases you will be able to resolve the issue, then proceed with the remove operation, but in others, its a permanent restriction, and you may need to lock/obsolete the object to discontinue its use.

There is a methodology in place for tracking the relationship of UCM objects that enables them to remain in synch throughout the life cycle. Hence, removal of some objects is prohibited to keep this process working correctly.

Review the Overview of the UCM process for more information.



Used versus Unused Objects

In general, objects that have been used in a UCM environment can potentially not be removed to prevent a break in its continuity due to the underlying interdependencies that exist between UCM objects. Where as objects that have never been used can be removed with minimal or no discretion since they are isolated and have not been introduced to other entities in the configuration.

An empty (never used) object is different than an unused object, which may have been in use at one time, but is no longer required. Removal of an unused object will depend on what it is and how it has been used in the environment. Some objects cannot be removed due to subsequent activity that was initiated from its resources.



Removing UCM Objects

Cleaning up the project when it ends is actually recommended to help manage the UCM environment, and improve the transition to the next version of the project.

Directions for Removing unused objects is detailed in IBM Rational ClearCase Managing Software Projects .

The Delete option in ClearCase Project Explorer (Exploring ClearCase Projects) can be used in removing some UCM objects, and command line functionality for the appropriate cleartool sub-commands are documented in IBM Rational ClearCase Command Reference. See the above Note that details how restrictions are enforced when attempting to remove a UCM object.



Example


Remove an empty Component
Requirements:

The component being removed must be empty and have no work performed on it.

To confirm the component has no history of work take the following action:

  1. Confirm no baselines have been created on the component:

    cleartool lsbl -component component:<component_name>@\<pvob_tag>

    Note: This should return only the initial baseline.

    Examples:

    Good:
    C:>cleartool lsbl -component component:UCM_3@\PVOB

    18-Oct-06.10:50:37  UCM_3_INITIAL  jdoe   "UCM_3_INITIAL"
     component: UCM_3@\PVOB


    Bad:
    C:\>cleartool lsbl -component component:UCM_Comp1@\PVOB

    11-Jul-06.17:25:01  UCM_Comp1_INITIAL  jdoe   "UCM_Comp1_INITIAL"
     component: UCM_Comp1@\PVOB
    11-Jul-06.17:34:04  deliverbl.user1_Cars.20060711.173400  jdoe   "deliverbl.user1_Cars.
    0060711.173400"
     stream: user1_Cars@\PVOB
     component: UCM_Comp1@\PVOB
    11-Jul-06.17:35:01  Cars_11-Jul-06.8719  jdoe   "Cars_11-Jul-06"
     stream: Cars_Integration@\PVOB
     component: UCM_Comp1@\PVOB



  2. Confirm that no stream is using any component baseline INCLUDING the initial.

    Note: You should not see any baseline hyperlinks at the bottom of the following commands output.

    cleartool describe -long baseline:<initial_bl_name>@<\pvob_tag>

    Examples:

    Good:

    C:\>cleartool describe -long baseline:UCM_3_INITIAL@\PVOB

    baseline "UCM_3_INITIAL"
     created 18-Oct-06.10:50:37 by jdoe.clearuser@HOST
     "Initial baseline for component "UCM_3""
     owner: DOM1\jdoe
     group: DOM1\clearuser
     component: UCM_3@\PVOB
     label status: Initially Labeled
     change sets:
     promotion level: INITIAL
     depends on:
     Attributes:
       PromotionLevel = "INITIAL"



    Bad:

    C:\>cleartool describe -long baseline:UCM_3_INITIAL@\PVOB

    baseline "UCM_3_INITIAL"
     created 18-Oct-06.10:50:37 by jdoe.clearuser@HOST
     "Initial baseline for component "UCM_3""
     owner: DOM1\jdoe
     group: DOM1\clearuser
     component: UCM_3@\PVOB
     label status: Initially Labeled
     change sets:
     promotion level: INITIAL
     depends on:
     Attributes:
       PromotionLevel = "INITIAL"
     Hyperlinks:
       UseBaseline@187@\PVOB <- stream:Cars_Integration@\PVOB
       UseBaseline@193@\PVOB <- stream:user1_Cars@\PVOB



  3. If any of the above steps return unexpected results, DO NOT REMOVE the component.

Removal Process:

  1. Create a new non-UCM (base ClearCase) view (dynamic or snapshot).

  2. Navigate into the view and into the Project VOBs directory.

  3. Obtain a list of all of your components using the lscomp command.

    Example:
    M:\baseview\ucmpvob>cleartool lscomp

    2006-12-06T15:40:04-05  ucmcomp  jdoe
     root directory: "\ucmcvob\ucmcomp"
    2006-12-06T16:34:41-05  ucmcomp_b  jdoe
     root directory: "<none>"
    2007-01-08T14:10:55-05  reprocomp  jdoe
     root directory: "\ucmcvob\reprocomp"
    2007-02-07T12:42:19-05  singlecomp_d  jdoe
     root directory: "\singlecomp_d"


  4. Remove the component using the rmcomp command.

    cleartool rmcomp <component-name>

    Example:
    M:\baseview\ucmpvob>cleartool rmcomp singlecomp_d

    Remove component "singlecomp_d"?  [no] yes
    cleartool: Warning: Searching PVOBs for baselines that depend upon baseline "singlecomp_d_INITIAL". This may take a few minutes...

    Removed component "SingleComp_D".

    Notes:
    • This will only remove the component object in the PVOB; the VOB object will not be removed with this command. If you wish to remove the VOB object (tag and storage), run the cleartool rmvob command. Review the ClearCase Command Reference Guide on the topic of rmvob (cleartool man rmvob) for more information.
    • If the component is a sub-VOB component, you will need to remove the directory in the VOB with cleartool rmname if you no longer wish to see the directory in the VOB, else the directory will still be visible, but non-componentized.

  5. Verify success by obtaining a new list of all of your components using the lscomp command.

    Example:
    M:\baseview\ucmpvob>cleartool lscomp

    2006-12-06T15:40:04-05  ucmcomp  jdoe
     root directory: "\ucmcvob\ucmcomp"
    2006-12-06T16:34:41-05  ucmcomp_b  jdoe
     root directory: "<none>"
    2007-01-08T14:10:55-05  reprocomp  jdoe
     root directory: "\ucmcvob\reprocomp"

Related Information

[{"Product":{"code":"SSSH27","label":"Rational ClearCase"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"UCM","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"2002.05.00;2003.06.00;7.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSSH27","label":"Rational ClearCase"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"UCM","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
16 June 2018

UID

swg21256615