How to list ClearCase activities in certain streams?

后端 未结 2 1013
無奈伤痛
無奈伤痛 2021-01-16 03:41

I\'m wondering if there is a way to specify which streams to get a list of activitis for in one command line call?

Right now I\'m building a list of activities based

2条回答
  •  半阙折子戏
    2021-01-16 03:50

    Doesn't it always seem you can never quite get ClearCase to tell you what you want to know in the form you want?

    An alternative may be to use the -fmt option

    ct lsact -fmt "%[stream]Xp %n\n" -inv /vobs/my_pvob
    

    You can then pipe through grep (-v) or other filter tool to exclude/get the projects of interest. Since it's not possible to list activities only for active streams, the alternative would be to also lock your activities when you lock the project/stream, then obsolete activities would be excluded (use -obsolete to list all activities).

    Or, building on VonC suggestion, process the active streams (no -obs switch) - without the need to store the list (unix):

    for stream in $(ct lsstream "%Xn" -inv /vobs/my_pvob); do
       echo ::: ${stream}
       ct lsact -in ${stream}
    done
    

提交回复
热议问题