cleartool: How to list all labels in a stream chronologically?

前端 未结 1 750
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-14 07:13

I want to list all the labels applied to a stream in a chronological order. Ideally, I would like one like the following for each label:

 
1条回答
  •  终归单人心
    2021-01-14 07:47

    If you are mentioning Stream, that means ClearCase UCM, which includes UCM Baselines.

    You need to reason with baselines, not labels: a baseline can be an incremental one, which means you won't find a label for all elements of a given component.
    (See "What is the difference between Full baseline and Incremental baseline in Clearcase UCM?" for more).
    Lbtypes and labels are attached ("guarded") to baselines (through an hyperlink), but the actual object (associated with a userId and a date) are baselines.

    cleartool lsbl -stream aStream@\aPVob
    

    That will list all the baselines, from the oldest to the newest, applied on a given stream.
    (see cleartool man lsbl)

    As commented by danger89, cleartool lsbl -s -stream aStream@\aPVob would display a short version per line.


    danger89 adds in the comments:

    To get a nice table output use:

    (printf "Baseline|Label Status|Promotion Level|Owner|Predecessor baseline\n" \ ; cleartool lsbl -lev BUILT -fmt "%n|%[label_status]p|%[plevel]p|%[owner]p|%[predecessor]p\n" ) | column -t -s '|'
    

    In multiple lines for readability:

    (printf "Baseline|Label Status|Promotion Level|Owner|Predecessor baseline\n" \ ; 
     cleartool lsbl -lev BUILT -fmt "%n|%[label_status]p|%[plevel]p|%[owner]p|%[predecessor]p\n" )
       | column -t -s '|'
    

    0 讨论(0)
提交回复
热议问题