Phil for Humanity Phil for Humanity
A Guide for the Survival of Humankind and Helping the World, Society, and Yourself.



ClearCase Support: How to Lock a Branch


Once in a while, I am asked to lock a branch, so that no user can add or delete to versions or labels on this branch. I prefer and recommend locking the entire branch type for each branch in an entire VOB. To do this, I use this command:

cleartool lock brtype:BRANCH_NAME

Keep in mind that you have to lock the branch type in each VOB that has the label. You can even specify the VOB name without going to the VOB using this command:


cleartool lock brtype: BRANCH_NAME@vob:VOB_TAG

You can even add a user exception list who the lock does not apply to. Here is any example on how to do this:

cleartool lock –nuser USERID1,USERID2, brtype:BRANCH_NAME

The USERID argument should at least include your core id.

by Phil for Humanity
on 20081120

Related Articles
 » ClearCase Support: How to Lock a Label
 » ClearCase Support: Finding Label and Branch Types
 » ClearCase Support: Renaming Label and Branch Types