Search code examples
shellclearcaseclearcase-ucmcleartoolclearcase-automation

How to get particular Clearcase file of previous versions


Right now, I have a file called config_1_2_3.xml for current track of my product .
In previous track file was of version of config_1_2_2.xml.

I am getting the file of version 1_2_2 by doing the below manual steps:

  • Open the version tree and get the particular file.
  • Then choose the option "Send to".

But I want to write a script by help of which, I can get the previous file (1_2_2), and copy it to my local drive, which will reduce the manual effort.

What command would be involve when writing such a script?


Solution

  • You can reproduce the "Send To" option of the version tree using the command cleartool get

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

    Replace \dev\hello_world\foo.c by the file full path name, and \main\2 by the branches and version number you have selected from the version tree.