In our project we are following agile practices ( Sprint ). So every day nightly build will be done. We are able to ensure the correctness of build till day before formal build. But unfortunately most of the time people are doing some major check-in at final day.
We wanted to lock some of the highly sensitive elements which would cause more trouble.
We do not want to lock the integration stream itself. We just wanted to lock some files and folders automatically. Is there any way to do it using Cleartool , (or cleartool commands in powershell)
I would not recommend locking the vob or the files:
cleartool lockman page) to be the type owner, VOB owner or root to be able to lock the files or a vob: if one of those sensitive files isn’t created by you, the lock will fail (and the vob itself has likely been created by an admin)Locking the stream or at least the branch is still your best option.
It is one simple atomic operation target to lock the right environment.
Combined with the
-nusersoption, you can still authorized some users to do what they need (checkout/checkins)The OP comments:
The
-nuseroption lock for all users except a few.The idea behind the integration stream is that is is not the user who make the deliver, but the stream integration owner who, at his/her own time, makes the deliver. If that stream is locked for everyone but the integrator, he/she can control the deliver
However, that puts the control of those sensitive file on the integrator (again, locking just those file would be a bad idea, and would make sure that any deliver fails, because of those locks)
If you still want them to deliver while being able to control that the build only use a certain version of those files, then I would rather recommend:
See for instance “Clearcase command to export an element” or
“In ClearCase, how can I view old version of a file in a static view, from the command line?“.