1

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

Jeff
  • 13
  • 2
  • Are you using `cleartool setview` at any point in in your script? – VonC Jan 25 '16 at 19:38
  • 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 Jan 25 '16 at 19:55
  • No, I would actually not recommend setview, as I have done so many time in the past (as in http://stackoverflow.com/a/33932379/6309). Try simply to do the same commands in a regular Windows shell. – VonC Jan 25 '16 at 19:57
  • 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 Jan 25 '16 at 19:59
  • What constraint would possibly force you to use Cygwin? – VonC Jan 25 '16 at 20:00
  • Anyway, I have updated the answer with a possible way to force the right files to be displayed, even in a Cygwin session. – VonC Jan 25 '16 at 20:02
  • Senior engineers require us to use Cygwin for the building process. If it was up to me, I wouldn't even be using ClearCase in the first place. Thank you for your responses, I appreciate your help! – Jeff Jan 25 '16 at 20:03
  • Did you try the additional `cleartool ls` I recommend below? That might work, under Cygwin. – VonC Jan 25 '16 at 20:04

1 Answers1

0

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.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Unfortunately, I'm forced to use Cygwin for this build script. I'm going to hold on for a bit to see if anyone has any Cygwin-specific fixes. If not, I will accept your answer so that anyone viewing this question in the future sees a solution. Thanks, VonC! – Jeff Jan 25 '16 at 20:02
  • `cleartool ls` did not work either. I think the issue may be just what you suggested: Cygwin doesn't support ClearCase. I'm going to accept your answer, as I think you've provided excellent help for anyone experiencing the same issue. Thanks for the help. – Jeff Jan 25 '16 at 20:08
  • @Jeff It did support Cygwin in the past (with some issues: http://www-01.ibm.com/support/docview.wss?uid=swg1PI07723). What version of ClearCase are you using? – VonC Jan 25 '16 at 20:11
  • Version 7.1.2.12. IT hasn't pushed out a new update yet, so I am stuck at this version for now. – Jeff Jan 25 '16 at 20:14
  • @Jeff OK. And which OS are you using? What version of Windows? – VonC Jan 25 '16 at 20:14
  • @Jeff Maybe it is time to also consider git within a ClearCase view ;) http://stackoverflow.com/a/28295769/6309 – VonC Jan 25 '16 at 20:18