我试图找到复合基线中关联的所有组件基线。
我可以使用以下方式实现它
cleartool desc -fmt %[rec_bls]CXp stream:My_Integration@\My_PVOB
(I would save the receommended baselines in some variable using powershell and replace it in next command)
cleartool describe -l baseline:"$Baseline"@\My_PVOB
是否可以组合这两个命令,以便我可以描述所有推荐的基线。
在上述方法中,我被迫使用一些脚本来保存基线,然后在 Cleartool 命令中使用它。如果它可以结合在cleartool本身中,那就太好了,而且很方便。
我没有找到一种方法来连接这两个describe
复合基线与其成员基线之间。
我的解决方案(并不令人满意)是在 bash 中(可通过 msyswwin 在 Windows 上使用,使用类似工具msysgit):
$ ct descr -l baseline:P_Summit_HUB_12_30_2011@\\Summit_HUB_pvob |grep "b)"|awk '{print "cleartool descr -fmt \"%[component]Xp %n\\n\" baseline:" $1 " >> afile"}'
我用什么都行fmt
我需要(这里只是与成员基线关联的组件的名称及其名称)
然后我执行每个输出行以获得最终结果'afile
'.
您的 PowerShell 脚本方法当然更好。
事实上,OP 萨姆塞尔瓦帕拉布确认以下所述 PowerShell 方法:
$Baselinefile="C:\Baseline.txt"
$project="MyComponents@\My_PVOB"
$pvob="@\My_PVOB"
# Find the list of Recommended baseline for the project
$Baselines=(cleartool lsproject -fmt "%[rec_bls]p" $project).split()
#Foreach baseline get the baseline and Component Name
foreach ($Bline in $Baselines) {
cleartool describe -l baseline:"$Bline"$pvob | Select-string -pattern "@\\My_PVOB)"| Out-File $BaselineFile -append
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)