1

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?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Abinash
  • 37
  • 10
  • I'll put an answer in a few hours, but try `cleartool get` as in http://stackoverflow.com/a/5381646/6309, or http://stackoverflow.com/a/15184990/6309 – VonC Mar 02 '17 at 15:12
  • Can we also.find out why you're not just using a view.to select the files for the previous release? If you're doing this to build a copy of the previous release, you might be building it with new.versions of files that are in common, meaning that your build isn't identical to said prior release. Using a full view would allow you to have a fully reproducible build. – Brian Cowan Mar 02 '17 at 18:56

1 Answers1

2

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.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250