1

I have already created my project views from the Rational Clearcase Client on XP machine. Due to some reason I need to format my machine and I have installed Windows 7. Now my problem is, I already have the existing folders of the views created on XP. How do I re-import it so it will be shown in my Clearcase Navigator on Windows 7 machine?

jaychapani
  • 1,501
  • 1
  • 13
  • 31

1 Answers1

0

In the OP jaychapani 's case (ClearCase Remote client):

The view storage for a "web view" is by definition on the CCRC server (so not on the client)

See " How to reconstruct a CCRC view copy area after an unintentional deletion"
(the equivalent of a snapshot view directory is called, in CCRC, "view copy area")

A situation may occur where a developer unintentionally deletes a copy area and there is no backup.
The Web view still exists on the CM server and the view tag still exists in the ClearCase registry.

There is no way to perform such recovery completely from the CCRC graphical user interface (GUI).

  1. Determine the View Tag (you can run cleartool lsview -l on the Web server: ask your ClearCase admin)
  2. Create a new copy area (for example: D:\Webviews\<VIEWTAG>)
  3. Create a .copyarea.dat file in the root of the above directory
    Refer to technote 1119280 About the .copyarea.dat and .copyarea.db files for further details about this file.
    a. Copy a .copyarea.dat file from another (known good) copy area into the root of the new copy area
    b. Remove the "READONLY" and "HIDDEN" file attributes from that file.
  4. Determine the UUID of the webview <VIEWTAG>.
    You can get the UUID by running a cleartool lsview -l on the Web server (again, ask your ClearCase admin).
  5. Modify the .copyarea.dat in the root of the new copy area.
    If it was from a copy, modify the UUID and also the name of the <WEBVIEW> including its hexadecimal length field; modify also the name of the VOB root directory.
    The timestamp in .copyarea.dat file does not need to be modified.
  6. Remove the view tag from the .ccase_wvreg file.
    Refer to technote1228258 About the CCRC .ccase_wvreg file for further details about this file.
  7. Use CCRC GUI to perform "Add existing view".
  8. Perform a Refresh->Repair->Discordance.
    This repairs the content of the view.

Original answer, for a full ClearCase installation

If depends where the view storage of your (snapshot) view is stored.

If the view storage isn't stored on your local computer, you can simply re-create the root directory of your snapshot view and use "regen_view_dot_dat.pl" script found in <cc-home-dir>\etc\utils to regenerate the view.dat hidden file.

See "Clearcase - Find out when view was created" for more on that tool.

From that path, you can type clearexplorer . (note the space and the '.' dot), and you will see your view back in the ClearCase Explorer. Update it and you will find back its content.

If you had saved your snapshot view before formatting (including the hidden file view.dat), this is even easier: go the root path of that view and type clearexplorer .: your view will be back.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • (If the view storage was on the same computer than the view itself... the easiest way is to recreate a view) – VonC Jul 31 '12 at 11:52
  • @jaychapani you mention Windows7, so you need to type it in a DOS windows command prompt (http://en.wikipedia.org/wiki/Command_Prompt), after a `cd` to the root directory of your view. – VonC Aug 01 '12 at 05:37
  • I got the following while running on the command prompt "'clearexplorer' is not recognized as an internal or external command,operable program or batch file." – jaychapani Aug 01 '12 at 07:01
  • @jaychapani add "`C:\path\to\Rational\ClearCase\bin`" (check where your ClearCase is installed, usually under `C:\Program Files`) to your path: `set PATH=%PATH%;C:\path\to\Rational\ClearCase\bin`. Then type `clearexplorer .` – VonC Aug 01 '12 at 07:06
  • @jaychapani that could have been an interesting tidbit of information to mention in your question! – VonC Aug 01 '12 at 07:12
  • Is there any way to do that?? – jaychapani Aug 01 '12 at 07:22
  • I lost my newly created view also after executing that command. Is it so?? How can I recover that? – jaychapani Aug 01 '12 at 07:23
  • @jaychapani ok, I have updated the answer to address your specific situation (CCRC client, not full ClearCase client). – VonC Aug 01 '12 at 07:26
  • Thanks for the info I have verified .copyarea.dat and add the existing view and it worked for me yepee!! thanks a ton :) – jaychapani Aug 01 '12 at 09:26