1

I need to create a tar of only a set of files (a.c, b.c, c.c) obtained from the ClearCase repository.
I need all latest versions of those files, and I am writing a script to do this.

How can I do it?
Should I create a new static view with a modified config spec and then do a tar?
If so, how can I select only those files to appear in the view and not the entire code base?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
SreeniH
  • 383
  • 4
  • 12

1 Answers1

1

You can create a snapshot view with a config spec like:

element * /main/LATEST
load /vob/path/to/a.c
load /vob/path/to/b.c
load /vob/path/to/c.c

(I am assuming here base ClearCase, not UCM ClearCase)

That would only load the relevant files, with the LATEST version selected.

You can script the creation of a snapshot view (to do only once) with the cleartool mkview command.
See examples in this answer.

See also "What are the differences between a snapshot view and a dynamic view?":
if you have a dynamic view with a simple config spec:

element * /main/LATEST

Then you wouldn't need to load files, only to mount the vob: all the files would be available.
That can be a solution too.

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