clearcasecleartoolvob

Get the ClearCase VOB of an activity, stream or stream location with cleartool


I'm trying to write a script to get the vob with the help of cleartool.

I have the activity id, the stream name and the stream location as input. From this I need to get the vob.

cleartool lsvob -short is pretty much what I need, but I only need the vob of the activity and stream.

cleartool describe -cview view-location did also not help.

Does anyone have an idea how to achieve this?

EDIT: cleartool descr -cact leads to the following:

activity "ActivityID"
created 2014-12-15T13:53:49+01:00 by User
master replica: HES@\vob
owner: dom\owner
group: group
stream: stream@\vob
current view: view name
title: Title
change set versions:
  ...changes
Attributes:
  activity_ok = "yes"
  Delivered = "no"
  Finished = "no"
  Type_Activity = "User"

Solution

  • If you execute a cleartool describe from within the view, it should pick up on the "vob of the activity" (meaning the PVob which is an admin vob of the current UCM root-based component vob that the view is accessing)

    cd /path/to/my/view/vobs/MyVob
    
    cleartool descr -cact
    cleartool descr -fmt "%Xn" -cact
    

    That should return the name of the currently set activity followed by @/vobs/ThePVob.
    ThePVob is the tag you are looking for: it will be the same for all activities in that stream.

    Using fmt_ccase, you can limit the output to the fully qualified name of the current activity: activty@\.