1

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)

Andy Arismendi
  • 50,577
  • 16
  • 107
  • 124
Samselvaprabu
  • 16,830
  • 32
  • 144
  • 230

1 Answers1

1

I would not recommend locking the vob or the files:

  • both options would lock everything (ie any modification in any branch) for all (or most) users.
  • you need (from the cleartool lock man 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)
  • the maintenance is too cumbersome for files (you need to maintain the list of files you want to lock)

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 -nusers option, you can still authorized some users to do what they need (checkout/checkins)

The OP comments:

Actually I want to prevent all the users from delivering those sensitive files.
If I lock the stream for particular user it will not serve the purpose. It will stop them delivering other files too

The -nuser option 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:

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Oh.. great advice. I do not want prevent people from making changes in their stream. Is it possible to stop them delivering those sensitive files to integration stream? – Samselvaprabu Jan 04 '12 at 06:41
  • I deleted my answer providing syntax for file locking. I have Clearcase/Cleartool experience but am not a Clearcase admin so file locking sounded like a decent way to prevent modification as the poster is hoping for. I added the clearcase and cleartool tags in hopes someone who is an admin might come along ;-) – Andy Arismendi Jan 04 '12 at 06:41
  • @AndyArismendi: yes, I saw some case of file locking being quite a pain to maintain. I would I answered sooner (as I do for *all* ClearCase question), but I saw the question just before taking the subway (no 3G signal there...). – VonC Jan 04 '12 at 06:43
  • @Samselvaprabu: "I do not want prevent people from making changes in their stream": the lock will only concern the integration stream, from which you make the build, not "their stream", ie the developers's streams. – VonC Jan 04 '12 at 06:46
  • Actually i want to prevent all the users from delivering those sensitive files. If i lock the stream for particular user it will not serve the purpose. It will stop them delivering other files too. – Samselvaprabu Jan 04 '12 at 06:54
  • @Samselvaprabu: ok. I propose (in my edited answer) an alternative to locking then. – VonC Jan 04 '12 at 07:09