且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Clearcase UCM基准

更新时间:2023-12-05 20:01:16

A 复合基线可以列出其直接依赖项,如此脚本,您可以尝试列出每个基准的基准。

确实返回输出(无错误)的基准就是您的复合基准。

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}

但是,以我先前关于 搜索输出行并保存在变量中,您可以做的是描述每个基线,询问其依赖性,并为该行进行grepping包含arobase' @ ':

仅复合基线将返回ful合格的基线名称(其中包含arobase),而不是非复合基线,该基线将返回...无)

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/ .*//"

更多可见性:

cleartool lsstream -fmt "%[found_bls]CXp" -view $VIEW_NAME \
| tr -s " " "\012" 
| xargs cleartool descr -fmt "%n %[depends_on]Cp" 
| grep "@" | sed -e "s/ .*//"