Is there any way to get the composte baseline information from the current view in command line .
I am using the comand in my script. It\'s displaying the list of th
I guess your composite baselines are rootless components, so you can check the components and display only rootless. You can use cleartool describe
for that.
A composite baseline can list its immediate dependencies, so as described in this script, you can attempt to list those for each baselines.
the one that does return an output (without error) is your composite baseline.
cleartool describe -fmt "%[depends_on]Np\n" {baseline selector}
However, building on my previous answer about "search the output line and save in variable", what you can do is describe each baseline, asking for its dependencies, and grepping for the line which contains an arobase '@
':
Only composite baselines will return fully qualified baseline names, with arobase in it, as opposed to a non-composite baseline, which will return... nothing)
cleartool lsstream -fmt "%[found_bls]CXp" -view $VIEW_NAME | tr -s " " "\012" | xargs cleartool descr -fmt "%n %[depends_on]Cp" | grep "@" | sed -e "s/ .*//"
For more visibility:
cleartool lsstream -fmt "%[found_bls]CXp" -view $VIEW_NAME \
| tr -s " " "\012"
| xargs cleartool descr -fmt "%n %[depends_on]Cp"
| grep "@" | sed -e "s/ .*//"