Clearcase command to export an element

前端 未结 1 497
北恋
北恋 2020-12-11 11:57

Is there any command in clearcase which I can use to export a paricular version of a file? (i.e. an element). I am doing a find label with a given label (using ct find

相关标签:
1条回答
  • 2020-12-11 12:44

    cleartool get could work (in a snapshot or dynamic view).

    get –to C:\build\foo.c.temp \dev\hello_world\foo.c@@\main\2
    

    You would need a script though, to extract from the %CLEARCASE_PN% the file name, and then pass to said script %CLEARCASE_XPN% (both variables are set by the cleartool find command)

    That script would be called for each version found through an -exec directive

    ct find . -ver lbtype(label) -cview -exec "myscript %CLEARCASE_PN% %CLEARCASE_XPN%"
    

    That way, you could build an export path from the first argument, and use the second argument as the full extended pathname to use in order to "get" the version selected by the find.

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