Find a local copy of files as a snapshot

I use the ClearCase Automation Library (CAL) in a tool that helps me track non-integrated changes; Now I would like to expand the tool so that I can also do checks through it.

For this function, I need to find a local copy of the snapshot. Although I can ask CC which view is attached to a specific directory, I cannot find a function to search for a local directory for a given View; it also appears that the most reliable method for determining the local representation of a snapshot is to compare the HostName property with the name of the local computer.

So: Given the IClearCase interface, how can I find all directories in which snapshot views exist?

+1
source share
1 answer

I confirm that you cannot find the root directory of the snapshot view, knowing its view tag: the snapshot view can be downloaded in several separate directories if you want.

The only link between your snapshot and its root directory is a hidden .view.dat file that contains the uid of the view.

In addition, the host name associated with the view has nothing to do with whether it is loaded or not on the computer. This is the name of the view server (which may be your own desktop or may be a centralized server). It is on this server that the view.exe process manages all ClearCase-related operations for this view.

So, with your script (e.g. perl script ) you do not need CAL first to find this view: you first need to look at the view.dat file, extract the uid, and then check if it matches the uid ( lsview -l -full -pro ) are looking for.

+1
source

All Articles