3

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?

Ravi
  • 239
  • 2
  • 14
  • You still have not validated answers to past questions (but are asking new questions): please take time to review your past questions first. – VonC Aug 09 '19 at 06:57
  • (I meant not just this question or just my answers: others have helped you) – VonC Aug 09 '19 at 07:12
  • Answers will get upvote or will be accepted if it solves the problem. Its not fair to link between the num of questions asked and the num of accepted answers :-) – Ravi Aug 09 '19 at 08:58

1 Answers1

1

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.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250