Search code examples
clearcaseclearcase-ucm

ClearCase: Stream maintenance


Who can lock/unlock/obsolete streams (or any other object) in a clearcase project? Do you have to be a privilaged user to perform these operations on streams that you didn't create?


Solution

  • The cleartool lock man page does mention:

    ClearCase privileged user is a designation referring to a user account that is a member of the clearcase group, which is granted ClearCase administrator rights when working in Full ClearCase.
    Members of the clearcase group are granted special ClearCase rights.

    Regarding Stream, a lock -obsolete Stream:xxx might be your only way to "remove" a Stream (especially if baselines were already created on it): see "Removing a UCM stream that has a delivered baseline".

    Here are some examples for locking multiple instances of a same type of object.

    To be sure a lock has actually worked, use the -fmt "%n %[locked]p\n" format when listing Streams:

    cleartool lsstream -obsolete -fmt "%n %[locked]p\n" -invob vob
    

    The OP Raihan adds in the comments:

    According to the ClearCase documentation it it recommended to lock a stream before creating a baseline to prevent users from delivering during the process.
    Isn't it overkill for a 'Project Manager' or 'Integrator' to have the root privilege who is managing a single UCM project (not necessarily created by him)?

    Two things:

    • one, that means locking a stream with the -nuser option, in order to allow the integrator to perform operations (like making a baseline) on that stream.
    • two, if the integrator is not the owner an in... "integration" stream, then he/she asks the ClearCase administrator to give him/her the ownership of said Stream.
    cleartool protect -chown integratorLogin stream:aStream@\aPVob