cleartoolclearcase-remote-client

rcleartool lsactivity does not have -fmt option


I have a script which needs to use cleartool lsactivity -fmt command:

$ctoolcmd = "cleartool lsactivity -fmt \"%[headline]p\" $newactivity";
$newheadline = `$ctoolcmd`;

Unfortunately, I am using CCRC and hence it does not support '-fmt' for 'lsactivity' command. Is there any other way I can achieve the same result with rcleartool command?


Solution

  • You might then need to use cleartool describe instead of lsactivity.
    Note: rcleartool does not support UCM object selectors, as I mentioned in 2012.

    -fmt might not be supported with describe as well, but you could grep its output in order to extract the headline.

    Test if a rcleartool describe activityName@\aPVob yields enough in its output, or if the activity: UCM selector is required (in which case, again, rcleartool would not support it)

    That should work: the documentation mentions:

    UCM objects

    Provides information on UCM objects: activities, baselines, components, folders, projects, and streams.

    This form of the command displays information similar to that displayed by the UCM commands lsactivity –long, lsbl –long, lscomp –long, lsfolder –long, lsproject –long, and lsstream –long.

    An lsact -long (which you can achieve with rcleartool describe anActivity@\aPvob) should include the headline, but again, you will have to parse and extract it from the output of this command.