1

enter image description here

I'm currently writing a script that has to check the recommended baseline of the Integration stream, so the only parameters that I know is the stream name, I'm wondering if there is a way to do that using cleartool on linux (bash script).

Here is my Vob:

And this is the Stream: enter image description here

Sneftel
  • 40,271
  • 12
  • 71
  • 104
Alex Brodov
  • 3,365
  • 18
  • 43
  • 66

1 Answers1

1

You can use the fmt_ccase option %[rec_bls]CXp:

On Windows:

cleartool descr -fmt "%[rec_bls]CXp" stream:streamName@\aPVob

On Unix:

cleartool descr -fmt "%[rec_bls]CXp" stream:streamName@/vobs/aPVob

You can see that command used in "How to describe recommend baseline with pipeline".


I have a few components in this stream, how should I mention which one I want?

Recommended baselines are associated to an UCM project or UCM stream, and include one or several components.
So you need to list those baselines first, then, for each one, check if your component(s) is included.

For each baseline found, you can list its component, as shown in "how to find root[folder] for each component using cleartool?"

cleartool lsbl -fmt "%[component]p" baseline:baselineName@\aPVob

(as usual, replace 'streamName', 'baselineName' or 'aPVob' with the appropriate names in your case)

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • No i got this error: Error: No match for wildcard: "descr -fmt"%[rec_bls]CXp" stream:RavenPlat1.5.5.0_Int@/vobs/tlv_pvob" – Alex Brodov Aug 21 '14 at 13:29
  • What command did you type? Why is there no space between your descr and your double quote? – VonC Aug 21 '14 at 13:30
  • i've edited the command and now i'm getting this error: Error: Unable to determine VOB for pathname "/vobs/tlv_pvob" – Alex Brodov Aug 21 '14 at 13:33
  • Remember, always type your cleartool command in a regular shell (not in a cleartool shell): so type `cleartool descr ...`, not '`descr ...`' – VonC Aug 21 '14 at 13:33
  • Right-click on your pvob (as show on your screenshot), and select properties: you will see its path. – VonC Aug 21 '14 at 13:33
  • I have 2 options: 1) Properties of Folder 2) Properties of Project VOB Which one should i choose? – Alex Brodov Aug 21 '14 at 13:35
  • option 2, properties of the pvob – VonC Aug 21 '14 at 13:36
  • Should i use the Global path or the Host path or the VOB tag? – Alex Brodov Aug 21 '14 at 13:36
  • You should use the vob tags: it should be `/vobs/yourPVob`. If it is `\yourPVob`, that would mean you are on Windows, which you said in your question you were not. – VonC Aug 21 '14 at 13:39
  • So now i'm testing it on windows, and my vob tag is: \tlv_pvob Should i change the command if i'm on Windows now ? – Alex Brodov Aug 21 '14 at 13:40
  • @user3502786 no, you said explitely in your question that you were on linux. But, if you actually are on Windows, then I will edit my answer. – VonC Aug 21 '14 at 13:44
  • @user3502786 you said: "using cleartool on linux (bash script).": where do you see Windows in there? – VonC Aug 21 '14 at 13:45
  • I'll use this command on linux, but now before i'm moving this to production i want to test it on Windows – Alex Brodov Aug 21 '14 at 13:47
  • As i can see it's adding ty my baseline "@/vobs/tlv_pvob" how can i print it without this ?\ – Alex Brodov Aug 27 '14 at 13:38
  • @user3502786 not easy, so it is best to process the string in a separate shell command (like `awk`, or `sed`) to remove the `@/...` part – VonC Aug 27 '14 at 14:07
  • Do you have any suggestions for this ? If yes pls write me some example. Thanks – Alex Brodov Aug 27 '14 at 14:08
  • @user3502786 it would be best as a separate section, with a clear example of the output you have, and the output you want. – VonC Aug 27 '14 at 14:11
  • this is my output : baseline:RAVENPLAT1.5.5.0_1.5.5.0-318_CHASSIS_PKG_193_15-AUG-2014_0350@/vobs/tlv_pvob I want untill the '@' sign – Alex Brodov Aug 27 '14 at 14:37
  • @user3502786 I mean in a separate question, with an example of the script which produces that output, and also the script language that you are using. – VonC Aug 27 '14 at 14:38
  • @user3502786 I see you have already a lot of good suggestions in http://stackoverflow.com/q/25529699/6309 :) – VonC Aug 27 '14 at 14:41