I would rather try without using cleartool setview
.
Access your data directly in the full path of your view: /view/XYZ/vobs/yourVob
That way:
- you don't have to exit any process in your script.
- you avoid creating a sub-shell when you call
setview
in your script: that explain why your path is incorrect.
See "Python and ClearCase setview" for an example of the kind of issue that sub-shell causes.
That obviously assume your dynamic view is already started (if not, cleartool startview
).
For a better understanding of why your shell cannot be completely executed when using setview
, see "Setting into a view from a shell script does not process the remaining commands in the script"
In the above script, any commands that appear after the execution of cleartool setview XYZ
are not processed because a shell is spawned with exec()
, which replaces the current program with a new program.
This means current process text and code segments, which in this case is the script that contains all the commands, is replaced by the program getting executed, which is the shell invoked by running cleartool setview XYZ
.
Hence, none of the commands are processed beyond the point of invocation of the setview.
In your case, the cd /ccase/src is never called.
If you work directly with the full path of your started view, you don't create any sub-shell and don't have that issue: your last cd /ccase/src
will be called.