IBM Support

About interesting versions in a VOB

Question & Answer


Question

What are interesting versions and why do errors occur when attempting to remove one from an IBM® Rational® ClearCase® VOB?

Answer

"Interesting" versions in ClearCase refer to versions that have any branches, or metadata, such as labels, hyperlinks, and attributes attached to it.

To determine if a version is "interesting", you can use cleartool describe and check the output to verify if there are any branches or metadata types attached to it. This output will only show information specific to the version that you specify in the cleartool describe, such as what branch that version is on and any metadata attached to it. However, to determine if any version for a specific element has sub-branches and versions, created by you or other users (with metadata associated with them), then you can use cleartool lsvtree.

When trying to remove an "interesting" version using only cleartool rmver, you will receive this error:


    S:\vobtag>cleartool rmver test.txt@@\main\3
    cleartool: Error: Removal of "interesting" versions must be explicitly enabled.
    Not removing these "interesting" versions of "test.txt":  \main\3 (has: hyperlinks)
    cleartool: Error: No versions of "test.txt" to remove.

Note: See the details below regarding the removal of "interesting" versions in a ClearCase UCM environment and the functionality of cleartool rmbranch with respect to removing "interesting" versions.

From the error, the version to be removed is hyperlinked and qualifies as an "interesting" version; thus, cannot be removed using cleartool rmver only.

Removal of "interesting" versions must be explicitly enabled. The error message refers to special options available for use with cleartool rmver that you can use to remove an "interesting" version. You will need to use one or more of the special options with the cleartool rmver command to remove an "interesting" version. The options used are dependent on what is preventing the removal of the version.

For example, to address the above error, you can add the -xhlink switch to remove the version in question:

S:\vobtag>cleartool rmver -xhlink test.txt@@\main\3
Removing these versions of "test.txt":
\main\3 (has: hyperlinks
Remove versions?  [no] yes
Removed versions of "test.txt".

There are several other special options that may be required to remove "interesting" versions. The list of special options includes the following:

  • –xbranch - Deletes a version even if one or more branches begin there. In the process, those branches (including all their versions and subbranches) are also deleted.
  • –xlabel - Deletes a version even if it has one or more version labels.
  • –xattr - Deletes a version even if it has one or more attributes.
  • –xhlink - Deletes a version even if it has one or more hyperlinks. This also destroys the hyperlink object, thus modifying the other object to which the hyperlink was attached.

Refer to the IBM Rational ClearCase Information Center under the topic of rmver for further details.

Removal of an "interesting" version will terminate with an error unless the user is privileged; see technote 1146253 for details. If there is no metadata and only branches that were created by the user, then the user is provided a method to clean up mistakes without administrator involvement.

However, in a ClearCase UCM environment, usage of the above special options are to be used with caution as you risk doing irreparable harm to your UCM project. You must be extremely careful when considering the removal of any UCM version or metadata. Removal of an element version (cleartool rmver) or removal of the entire element tree (cleartool rmelem) is not an operation that can be recovered from completely with regard to UCM metadata. A version or element can be restored from backup, but there is no method to restore UCM metadata, such as change set membership and baseline labels.

The cleartool rmbranch command does not adhere to the above restrictions:

There is a known allowance for removing interesting versions when using cleartool rmbranch. The cleartool rmbranch command allows the branch owner to remove a branch instance from an element owned by another user. It also allows the element owner to remove a branch instance owned by another user. In both cases, the cleartool rmbranch succeeds even when the branch on the element has sub-branches and versions created by other users, with metadata, including hyperlinks, labels and attributes, associated with them.

In the case of ClearCase UCM, a user who created an element can remove the integration branch of that element after it has been delivered to the integration stream and included in a baseline. This can be very difficult to recover from, since UCM metadata cannot be restored. For example:

> ct rmbranch


/vobs/equinox/appbuild/HDX/fpga/quad10gp/quad10gp.chain_cmd@@
/main/APP_COMMON_integration
Branch "/vobs/equinox/appbuild/HDX/fpga/quad10gp/quad10gp.chain_cmd@@
/main/APP_COMMON_integration" has 1 sub-branches, 5 sub-versions
Remove branch, all its sub-branches and sub-versions?  [no] y
Removed branch
"/vobs/equinox/appbuild/HDX/fpga/quad10gp/quad10gp.chain_cmd@@
/main/APP_COMMON_integration".

This command successfully deleted 2 versions of an element on the integration stream that had been delivered to that stream by another user, each version with several baseline labels, and one sub-branch with versions (the user owned the element and the sub-branch)




For more information on using and restrictions for any of the cleartool sub-commands discussed in this technote, refer to the IBM Rational ClearCase Information Center, or run cleartool man from command line.

[{"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":"PF015","label":"IRIX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"7.0;7.0.1;7.1;7.1.2;8.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSSH27","label":"Rational ClearCase"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"VOB","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
29 September 2018

UID

swg21122442