0

How can I lock all the streams under integration stream in ClearCase UCM?

Mat
  • 202,337
  • 40
  • 393
  • 406
sohani
  • 11
  • 1
  • What does this have to do with Perl? – Ether Aug 31 '10 at 16:24
  • @Ether: because ClearCase comes with its own Perl installation: `ccperl`, making perl the scripting language of choice for that kind of task. My answer illustrates however that you don't need advanced scripting for such a simple task. – VonC Aug 31 '10 at 16:53

1 Answers1

1

The cleartool lock operation in UCM is not a recursive operation.
If you only lock the integration stream, it won't lock the substream

You need to list all the streams under an integration stream and lock them individually.

cleartool lsstream -s -in stream:My_Int_Stream@\myPVob -r

combined with gawk, you don't even need to script it:

cleartool lsstream -s -in stream:My_Int_Stream@\myPVob -r | gawk "{print \"cleartool lock -nc stream:\"$1\"@\\myPVob\"}"

Note the restrictions in the man page: you probably need to be the owner of those streams to be able to lock them.
Note also the -r to make sure you have all the sub-streams, and not the direct child streams of the Integration one.

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