如何从describe命令中单独过滤基线(UCM)? [英] How to filter the baselines(UCM) alone from describe command?

查看:68
本文介绍了如何从describe命令中单独过滤基线(UCM)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于我们有许多组件,因此我尝试使用以下命令来描述所有基线

As we are having many components , I am trying to describe all the baselines using following command

cleartool描述-l基线:Baseline_2.1.0.13 @ \ My_PVOB

cleartool describe -l baseline:Baseline_2.1.0.13@\My_PVOB

它提供如下输出

"Build 13"
master replica: My_PVOB@\My_PVOB
owner: Admin
group: ABC
stream:Components_Integration@\My_PVOB
component: Baselines@\My_PVOB
label status: No Versions to Label
change sets:
promotion level: INITIAL
depends on:
  Baseline_2.1.0.13.8206@\My_PVOB (Comp1@\My_PVOB)
  Baseline_2.1.0.13.433@\My_PVOB (Comp2@\My_PVOB)
  Baseline_2.1.0.13.423@\My_PVOB (Comp3@\My_PVOB)
  Baseline_2.1.0.13.3763@\My_PVOB (Comp4@\My_PVOB)

实际上我只想获得以下内容取决于:(想得到仅以下内容)

Actually i want to get contents only below depends on: ( Want to get Just following contents)

Baseline_2.1.0.13.8206@\My_PVOB (Comp1@\My_PVOB)
  Baseline_2.1.0.13.433@\My_PVOB (Comp2@\My_PVOB)
  Baseline_2.1.0.13.423@\My_PVOB (Comp3@\My_PVOB)
  Baseline_2.1.0.13.3763@\My_PVOB (Comp4@\My_PVOB)

如何省略其余信息?

推荐答案

来自

(UCM基准)复合基准直接依赖的基准

(UCM baselines) The baselines that the composite baseline directly depends on

因此,对于复合基线:

cleartool descr -fmt "%[depends_on]Cp" baseline:aBaseline@\apvob

可以做到这一点,除了它只会在一行行上打印相关的基线,每个名字之间用空格隔开,而没有它们相关的组件名称.

could do the trick, except it will print only the dependent baselines on one line, each name separated by space, and without their associated component name.

因此,您需要解析该输出,并对每个基线名称执行以下操作:

So you need to parse that output, and for each baseline name, do a:

cleartool descr -fmt "%[component]Xp" baseline:aBaseline@\apvob

(或者,如果您的基准命名约定允许的话,一个简单的方法:

(Or, if your naming convention for baselines allows for it, a simple:

cleartool describe -l baseline:Baseline_2.1.0.13@\My_PVOB | grep Baseline_ 

会更容易!)

实际上, OP samselvaprabu 提出了最后一个建议,即从初始输出中复制出他需要的内容.他的grep优于我的建议,因为它不依赖于基准命名约定,而是取决于所述基准的PVob名称:

Actually, the OP samselvaprabu took the last proposition to grep what he needed from the initial output. His grep is better than my proposal, because it doesn't depend on the Baseline naming convention, but on the PVob name of said baselines:

我正在使用Windows,因此您的上一个(简单)命令给了我这个主意.
以下命令在Dos中有效

I am using windows so your last(simple) command gave me the idea.
Following command works in Dos

cleartool describe -l baseline:Baseline_2.1.0.13@\My_PVOB | find "@\My_PVOB)" 

这篇关于如何从describe命令中单独过滤基线(UCM)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆