Naveen
Naveen

Reputation: 73443

Clearcase command to export an element

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 . -ver lbtype(label) -cview -print command) and want to export the elements returned by the find label to hard disk.

Upvotes: 2

Views: 3237

Answers (1)

VonC
VonC

Reputation: 1323613

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.

Upvotes: 3

Related Questions