clearcase ucm baseline

前端 未结 2 980
暗喜
暗喜 2020-12-22 03:39

Is there any way to get the composte baseline information from the current view in command line .

I am using the comand in my script. It\'s displaying the list of th

相关标签:
2条回答
  • 2020-12-22 04:11

    I guess your composite baselines are rootless components, so you can check the components and display only rootless. You can use cleartool describe for that.

    0 讨论(0)
  • 2020-12-22 04:13

    A composite baseline can list its immediate dependencies, so as described in this script, you can attempt to list those for each baselines.
    the one that does return an output (without error) is your composite baseline.

    cleartool describe -fmt "%[depends_on]Np\n" {baseline selector}
    

    However, building on my previous answer about "search the output line and save in variable", what you can do is describe each baseline, asking for its dependencies, and grepping for the line which contains an arobase '@':
    Only composite baselines will return fully qualified baseline names, with arobase in it, as opposed to a non-composite baseline, which will return... nothing)

    cleartool lsstream -fmt "%[found_bls]CXp" -view $VIEW_NAME | tr -s " " "\012" | xargs cleartool descr -fmt "%n %[depends_on]Cp" | grep "@" | sed -e "s/ .*//"
    

    For more visibility:

    cleartool lsstream -fmt "%[found_bls]CXp" -view $VIEW_NAME \
    | tr -s " " "\012" 
    | xargs cleartool descr -fmt "%n %[depends_on]Cp" 
    | grep "@" | sed -e "s/ .*//"
    
    0 讨论(0)
提交回复
热议问题