Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reuse a ClearCase view

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?)

like image 271
Rubasu Avatar asked Oct 08 '22 16:10

Rubasu


1 Answers

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.

like image 183
VonC Avatar answered Oct 11 '22 21:10

VonC