Clearcase snapshot view path's not resolving when comparing - windows

We use Clearcase at my work and I have several snapshot views setup (on Windows XP). The views themselves seem to work great, however whenever I try to compare any versions of any elements from my snapshot view, I have problems with my diff tool (currently Beyond Compare). Specifically, if I'm comparing with previous, I see the current version great, but the previous version never shows up in the diff tool.
I've looked into the problem a bit and looking at the command line that is getting passed into the diff tool, CC is passing in a bad path to the file. The path to the file that is not working looks something like this:
//server/path/to/viewstorage.vws/....
The problem appears to be in the //server used to access the SMB share where the file is found.
Where is CC getting this bad path from? Is this something specific to how my snapshot view is setup (this worked for a long time and still works on some of my co-worker's machines)? Is there any way to change this path to the typical \\server that Windows expects?
Update:
Ok, so my original question was written from home, and wasn't entirely accurate. The actual path is more like this:
//server/path/to/vobstorage.vbs\....
To answer #koslorr question, the global path for the view is correct (the view is actually stored on a public share on my machine), however doing the similar command for the vob (cleartool lsvob -l /my-working-vob) does show that the global path for the VOB is incorrect. Can this be updated in a similar way to the view tag? Is this something my CC admin is going to need to do?

Check your view Global Path with
cleartool lsview -l <VIEW TAG>
Is the Global Path in the correct \server.... form?
If it is not, then you can use
cleartool mktag -view <VIEW TAG> -replace...
to change it to the correct form.
cleartool man mktag should tell you more in details.

What a cleartool diff -pred myFile gives you when executed in your snapshot view path?
cd c:\path\to\my\snapshotView\myVob\path_to_myFile
cleartool diff -pred myFile
If the global path is incorrect, it can be because of:
an incorrect mktag (cleartool man mktag), as kolslorr mentions in his answer. Don't forget to specify the host of the view storage as well as its global path (see "Renaming a ClearCase VOB or View")
an incorrect region (see your ClearCase control panel): the view might be correctly defined in another region

Related

Alias or Redirection from \\Server1\folderA to \\Server2\folderB

We currently have a legacy solution (on Windows) where the source code cannot be changed, and it is hard-coded to use paths in a specific location \\Server1\folderA for example on really old servers where data-content is stored.
We now have new servers that we want to use instead to hold our data content, but cannot update the hard-coded paths in the legacy solution to use these directly.
Is there anyway to use an alias, or a redirection from one fileserver to another, so that when something tries to get data content from path \\Server1\folderA it gets redirected over to \\Server2\folderB for example and therefore uses the files on the new server?
Thanks
I think I have found a solution to my own problem:
Open a Command Prompt with Administrator privileges and use the following command:
mklink /d \\Server1\folderA \\Server2\folderB

How to extract entire code from clearcase for a given label?

What would be the best way to extract code from clearcase for a give label. Planning to do this in perl first then in GUI based model.
Whenever release is made, release label is applied on all files. Once tested, This script should copy/extract all the files from clearcase and upload it to another server.
Environment: Windows.
any insight would be of great help.
Create a snapshot/dynamic view with config spec, element * Label. Then use windows command to copy.
tar cf tarfile $(ct find -a -ver 'lbtype(Label)' -print) , need to find similar one for windows env. No Cygwin.
If the label is applied on all elements, then create a view with the right config spec is the easiest way to access the code referenced by that label
element * mylabel

monitor a file on mac os x

There are a lot of similar posts out there, but none that does exactly what I want: I want a simple script, that watches a folder on a Mac for changes and passes the filename of the modified file to command/script when changes are detected.
The tool inotifywait doesn't exist on a mac. Folder events or fswatch or watchdog seem to be getting close, but it turns out they only watch folders or only return the folder name. watchdog might be doing what I need, but I could only find commands like this
watchmedo shell-command --recursive --command='echo ${watch_src_path}' .
which again only passes the folder name in the variable watch_src_path. Does anyone know how to get it (or another program) to pass on the file name of the changed file?
Even if the question is very old, it may be useful to other people looking for the same functionality. I wrote fsw exactly to fill this gap. fsw will give you the name of the changed paths and the type of change event.
Hope this helps.
Edited: fsw was merged with fswatch.

How can I use two Clearcase views simultaneously?

I am running code review tools on a large application. The code is all held in a ClearCase team view, but information on the Maven build is held in another. The developers get a view which includes the code and the Maven build repository, but that is not possible for test teams here. I have a view which lets me see the code and another view which gives me access to the Maven repository.
My problem is I can't seem to find a way to have both views active at once.
To run my test tools I use cleartool setview -exec "test scripts etc" mycodeview
Is there a way to run my review tools while also having access to mymavenview?
I confirm that for dynamic view, you cannot use cleartool setview for several views.
setview is only a way to mount the vobs directory within your dynamic view to /vobs.
I would rather use snapshot views, update their content in a custom path, and through symlink (not managed by ClearCase), make sure I see the relevant content of one view from the other.
Notes:
a cleartool symlinks isn't useful here, since one view don't reflect the full content you need.
dynamic views could be used, but I find them much slower in those case that snapshot views.

How can a Dynamic View be accessed in Hudson from a KornShell script?

Using a Clearcase Dynamic view, Hudson's job log shows cleartool's lsview, startview and lshistory commands are all successful.
However, the subsequent build script (SunOS KornShell (ksh)) fails to access the view's directories.
Running "cleartool pwv" instead of the shell script yields:
Working directory view: ** NONE **
Set view: ** NONE **
Which confirms that the Hudson-invoked shell appears to running in it is own world.
Is this the correct Hudson behavior or have we configured it incorrectly?
P.S. the ksh script can be tweaked, but it is one of those legacy things we have to keep.
If you want cleartool pwv to return a view, you need to make sure your script will execute itself with a view path (/view/myDynamicView for dynamic views).
I recommend using an existing dynamic view in your Hudson job.
I wouldn't use in your script a path like /vobs/aVob/.../ because /vobs is a mounting point (only one) to be set for one dynamic view. And your script might not have set said dynamic view (to /vobs, see cleartool setview). Using the full absolute path is more robust.
(Note: I don't know if your script use this shortcut, but I just mention here to cover fully this topic)

Resources