1
votes

I am using Cleartool in a build script to update a dynamic view's config spec. The script is a perl script being run on Cygwin. The Cleartool command successfully changes the config spec of the dynamic view, but it does not update the view itself. In the script we use the following commands:

cleartool setcs -tag <view_name> <config_spec_file1>
cleartool catcs -tag <view_name>

The catcs command outputs the expected config spec, and opening up the view's config spec in ClearCase Explorer shows the expected config spec. It is not until we open up the config spec, and simply hit apply, that we see the expected view files (we don't change anything in the config spec, we just open, apply, and close).

We have also tried forcing the view to stop/start after the setcs command, but that didn't work either.

I would expect that the setcs command alone would be enough, as the documentation says that's all that is needed.

setcs documentation

1
Are you using cleartool setview at any point in in your script? - VonC
I don't. We are seeing the config spec for the view update properly, but the view itself doesn't reflect the changes made in the config spec. Could this be why? - Jeff
No, I would actually not recommend setview, as I have done so many time in the past (as in stackoverflow.com/a/33932379/6309). Try simply to do the same commands in a regular Windows shell. - VonC
Working through a Windows shell successfully updates the config spec and the view. I'm constrained to a Cygwin shell for this build script, unfortunately. - Jeff
What constraint would possibly force you to use Cygwin? - VonC

1 Answers

0
votes

If possible, avoid Cygwin, and run the perl script in a simple CMD session.

You have some resources for getting Unix commands without having to use Cygwin.

If you really have to use Cygwin, add at least a cleartool ls (done in the vob of the view whose config spec just was updated).
An ls should force the files to be updated.