Phil for Humanity Phil for Humanity
A Guide for the Survival of Humankind and Helping the World, Society, and Yourself.

ClearCase Support: How to Synchronize a UNIX View to Windows in UNIX

Do you create ClearCase Views on UNIX and then use the ClearCase Region Synchronizer on Windows to import the UNIX View into the Windows Region? This enables UNIX Views to be used on a Windows computer; however, this process is extremely slow and manual. It is slow because the Region Synchronizer needs to collect the entire list of all UNIX Views and exclude the UNIX Views that have already been synchronized to Windows. Then you have to manually find the UNIX View that you want to synchronize. All of this takes time. If you have a lot of UNIX Views, then this process can take a long time.

Well, if you synchronize the UNIX View from the UNIX command line, then this step is much faster and even automatable. Here is how to do this.

Assume that you have already created a UNIX View called "test". You will need the View UNIX storage directory, for example "/viewstore/view_directory1/test.vws". You will also need to know the View Serverís name that hosts that View storage directory, for example "view_server1".

You will also need several pieces of information from the ClearCase Windows Region. First, you need to know the Windows Region name, such as "win_region". Additionally, you will need the Windows path to access the UNIX Views storage directory, such as "\\view_server\view_directory1\test.vws". However on UNIX this Windows path would need to have each backlash with an extra backlash like this "\\\\view_server\\view_directory1\\test.vws".

With all of this information, this is the UNIX command to synchronize a UNIX View onto the Windows region. You can even run this command on Windows if you want.

cleartool mktag -view -tag VIEW_NAME -reg WINDOWS_REGION_NAME -host VIEW_SERVER_NAME


For example, with all of our example data filled out, the final command would look like this:

cleartool mktag -view -tag test -reg win_region -host view_server1

-gpath \\\\view_server\\view_directory1\\test.vws /viewstore/view_directory1/test.vws

You may want to re-direct the output of this command to standard error or /dev/null, since this command usually results with a lot of warning messages, since ClearCase is unable to validate the Windows View Storage directory from UNIX. You can just append "2>&1 /dev/null" to the end of the command.

by Phil for Humanity
on 20090520

Related Articles
 » ClearCase Support: How to Delete a View in ClearCase
 » ClearCase Support: Finding Old Views
 » ClearCase Support: How to Create a View in ClearCase