IBM Support

Definition of type in AdminVOB would be eclipsed

Troubleshooting


Problem

This technote explains why attempts to create an IBM® Rational® ClearCase® AdminVOB hyperlink in a non-UCM environment from a client VOB to an Administrative VOB results in the error []Definition of branch type "br1" in would be eclipsed by definition(s): branch type "br1" in [] and provides instructions to resolve the issue.

Cause

Note: The error could be about other metadata types such as a label and or attribute. For the purposes of this document, we will focus on branch types. However, the solution is the same for any type object.

A branch type by the same name already exists in the AdminVOB that would conflict with the ordinary branch type with the same name currently defined in the client VOB.


Note: To avoid eclipsed types, you should create the AdminVOB hyperlink with the -acquire option.

Example:

cleartool mkhlink -acquire hltype:AdminVOB vob:\Client_vob vob:\Admin_Vob

Review the ClearCase Command Reference Guide on the topic of mkhlink (cleartool man mkhlink) for more information.

Scenario:
  • Without the -acquire option
M:\view3\pvob>cleartool mkhlink AdminVOB vob:\CQbaseV2 vob:\pvob
cleartool: Error: Definition of label type "REL3" in \pvob would be eclipsed by definition(s):
        label type "REL3" in \CQbaseV2
cleartool: Error: Unable to create hyperlink "AdminVOB".
  • With the -acquire option

M:\view3\pvob>cleartool mkhlink -acquire AdminVOB vob:\CQbaseV2 vob:\pvob
Created hyperlink "AdminVOB@78@\CQbaseV2".


Important:

You may still see errors using the -acquire option if the definitions of the two types being linked are not identical. If you execute the mkhlink command as illustrated above and you still receive an error, then run cleartool lstype -long <type>:<type name> on both metadata types being connected and compare the definitions. They will be different in at least one parameter. For example the Constraint of the type could be different. This needs to be corrected. The types must be identical for mkhlink -acquire to work.

Resolving The Problem

Follow the below steps to resolve this name conflict. This is not intended for use in a UCM environment.

Note: The syntax below is taken from a Microsoft® Windows® environment. The syntax for UNIX® and Linux® is the same with the exception on the find command as outlined in step 3.

  1. Rename the branch type and instances in the client VOB to a temporary branch name (that does not already exist in the Admin VOB). This will then allow the AdminVOB hyperlink creation to complete with no conflicts.

    Example:

    P:\Client_vob>cleartool rename brtype:br1 brtype:br1temp
    Renamed branch type from "br1" to "br1temp".


    P:\Client_vob>cleartool lstype -long -kind brtype
    branch type "br1temp"
    04-May-01.07:50:43 by jdoe.user@host1
    owner: jdoe
    group: user
    scope: this VOB (ordinary type)
    constraint: one version per element


    P:\Client_vob>cleartool find . -version brtype(br1temp) -print
    .\dmmdir@@\main\br1temp\0
    .\dmmdir@@\main\br1temp\1
    .\dmmdir\dmm.txt@@\main\br1temp\0
    .\dmmdir\dmm.txt@@\main\br1temp\1
    .\dmmdir\dmm2.txt@@\main\br1temp\0
    .\dmmdir\dmm2.txt@@\main\br1temp\1


  2. Create the AdminVOB hyperlink

    Example:

    P:\Client_vob>cleartool mkhlink hltype:AdminVOB vob:\Client_vob vob:\Admin_Vob
    Created hyperlink "AdminVOB@97@\Client_vob".


    Note: Both the global br1 type from the AdminVOB and the ordinary br1temp type from the client VOB are displayed

    P:\Client_vob>cleartool lstype -long -kind brtype

    branch type "br1"
    19-Jul-00.08:21:52 by jdoe.user@host1
    master replica: original@\Admin_Vob
    request for mastership: allowed for all instances
    owner: jdoe
    group: user
    scope: global
    constraint: one version per element
    branch type "br1temp"
    04-May-01.07:50:43 by jdoe.user@host1
    owner: jdoe
    group: user
    scope: this VOB (ordinary type)
    constraint: one version per element



  3. Change the branch instances from the temporary branch name to the original branch name using the global branch type that is defined in the AdminVOB. To accomplish this task, find and replace all instances of branch br1temp with br1. The find command will locate all the instances of the br1temp branch type and the chtype will change those instances from ordinary type br1temp to global type br1.

    Example:

    P:\Client_vob>cleartool find . -branch brtype(br1temp) -exec "cleartool chtype br1 %CLEARCASE_XPN%"
    Automatically created branch type "br1" from global definition in VOB "\Admin_Vob".
    Changed type of branch ".\dmmdir@@\main\br1temp" to "br1".
    Changed type of branch ".\dmmdir\dmm.txt@@\main\br1temp" to "br1".
    Changed type of branch ".\dmmdir\dmm2.txt@@\main\br1temp" to "br1".


    Note: UNIX and Linux syntax appears as follows:

    cleartool find . -branch 'brtype(br1temp)' -exec 'cleartool chtype br1 $CLEARCASE_XPN'


  4. Verify that there are no more instances of br1temp by running the find command again.

    Note: You should see no output.

    P:\Client_vob>cleartool find . -all -branch brtype(br1temp) -print

  5. After successfully changing all the branch instances to the original branch name, the temporary branch type can then be removed.

    Example:

    P:\Client_vob>cleartool rmtype -force brtype:br1temp
    Removed branch type "br1temp".

[{"Product":{"code":"SSSH27","label":"Rational ClearCase"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"VOB","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"}}]

Document Information

Modified date:
16 June 2018

UID

swg21124273