Removing a UCM version fails with unable to remove versions

cleartool: Error: Unable to remove versions of "" , when trying to remove a version

When trying to remove an element version you get the following error:

M:\My_View\My_Vob>cleartool rmver -xbranch -xlabel -xattr -xhlink
file.c@@\main\2
Removing these versions of "file.c":
\main\2 (has: hyperlinks)
Remove versions? [no] yes
cleartool: Error: Unable to remove versions of "file.c"

This error happens due to a reference on the version that cannot be resolved, such as a broken (dangling) hyperlink, or (when using ClearCase UCM) a lock on an activity that this version belongs to will block the removal of that version.


Resolving the problem
This technote discusses removing element versions in a ClearCase UCM enviroment. As such, there are specific considerations you should be aware of before removing a UCM element version; review technote 1122442 for more details before proceeding.

TROUBLESHOOTING:

  1. Make sure to run the following commands as VOB owner or as ClearCase Administrator

  2. Run cleartool checkvob -hlink on the version to remove any dangling hyperlinks:
    • cleartool checkvob -hlink Note: If the command asks if it should remove a hyperlink that it cannot resolve then answer yes.

  3. Verify that the linked activity is not locked, or unlock the activity: Note: For ClearCase 2002.05, see technote 1130028 for details on a defect that allowed versions to be removed even if there was a locked label type attached to it.
    • cleartool describe -l will show what activity the version belongs to; example: cleartool describe file.c@@/main/2
    • cleartool lslock -obsolete activity:@\ will show the lock status of the activity; example: cleartool lslock -obsolete activity:Myactivity@\PVOB1
    • cleartool unlock activity:@\ will unlock the activity; example: cleartool unlock activity:Myactivity@\PVOB1

  4. For removing "interesting" versions, you can run cleartool rmver with all the options listed below:
    • cleartool rmver -xbranch -xlabel -xattr -xhlink ;

      Example:

      cleartool rmver -xbranch -xlabel -xattr -xhlink file.c@@/main/2

No comments:

Post a Comment