5

I would like to reload a view (which was created previously) instead of creating a whole new one.

Two scenarios:

1 - Hard drive crashes and the local view isn't there anymore.
2 - A new laptop is set up with ClearCase.

In either (or both) of these cases, can a view be restored on your local drive? Or does the view have to be removed and then create a new one? I would rather not have STREAM_2_int and STREAM_3_int if I can get away from that.

(Side question: If someone has a desktop and a laptop, can they use the same view on each, or is it only one for each computer?)

Rubasu
  • 379
  • 3
  • 14

1 Answers1

4

Yes, for a snapshot view, provided the ClearCase view storage (the .vws directory) isn't on the same workstation than the view itself.

The only file needed to make a directory a root directory of a (previously created) snapshot view is the hidden file view.dat.

See the IBM technote "Regenerate the view.dat file"

And the perl script (packaged within any ClearCase installation) used to restore that view.dat file is <ClearCase>\etc\utils\regen_view_dot_dat.pl -tag <view-tag-id> <view root directory path>.

Example:

C:\source>ccperl c:\Rational\ClearCase\etc\utils\regen_view_dot_dat.pl -tag aSnapViewName .
rgy_view_uuid: "d17190d381de4ce89757d5465eb41f2c".
creating ".\view.dat".

C:\source>type view.dat
ws_oid:00000000000000000000000000000000 view_uuid:d17190d381de4ce89757d5465eb41f2c

Again, that can only work if the view storage \\shared\path\to\aSnapViewName.vws is in a shared path accessible from the workstation or from the new laptop.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • It seems to create the view.dat in "\\shared\path\to\aSnapViewName.vws\view.dat" and not on my local drive. Am I missing something? – Rubasu Jun 01 '12 at 14:10
  • 1
    @Rubasu yes, I have fixed this error: the second argument of the perl script is the path where to generate the `view.dat`. I have added a reference to the official IBM technote for more details on that process. – VonC Jun 01 '12 at 14:59