How to obtain previous baseline from stream

泄露秘密 提交于 2020-05-28 04:08:39

问题


I can retrieve latest baseline which is always recommended in my case using following command

"cleartool desc -fmt \"%[rec_bls]CXp\" stream:".$SourceStream."\@\\".$pvob

I want to retrieve second latest baseline.Is it possible to obtain previous baseline from a given stream using cleartool command? previous applied baseline on any given component will also works.I need this to get difference between two streams from different projects which can be done by following command.

"cleartool diffbl -elements baseline:".$LastComponentBaseline." stream:".$CurrentStream;

回答1:


You can start by looking at the output of cleartool lsbl: it does list (for a given stream and/or component).
Combined with fmt_ccase, you can grep the recommended baseline you know, and the line before, since lsbl lists baselines from the oldest to the newest

cleartool lsbl -fmt "%[component]Xp %n" -stream aStream@\aVob | grep -B 1 -E "yourComponent.*yourBaseline"

You need to grep for the right component name (displayed by the %[component]Xp format), as lsbl (on a stream) would list all baselines of all components.



来源:https://stackoverflow.com/questions/46958915/how-to-obtain-previous-baseline-from-stream

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!