The lock command prevents users from make various changes to the specified
dynamic stream:
Usage of both -kf and
-kt in the same command is not valid (the first option appearing on the command line is taken, and the second is ignored). But you can use these two options in separate
lock commands, to establish both “from” and “to” locks on the same stream.
By default, the lock applies to all users. The -o <principal-name> option makes the lock apply only to a specified AccuRev user. Similarly, the
-o <group-name> option makes the lock apply only to the members of the specified AccuRev group.
Conversely, use the -e option to make the lock apply to everyone but the specified AccuRev user or group. That is, the specified user or group will be able to perform promotions, but no one else will.
A stream can have at most one lock of each type — “all”, “from”, or “to”. This means you cannot use multiple lock -o commands to lock a stream for users
tom,
dick, and
harry. To accomplish this, put these users in an AccuRev group and apply a lock to that group.
AccuRev’s system of real versions and
virtual versions means that a version of an element seems to exist in multiple streams at once. A lock on one of those streams does not apply to any of the other streams. For example, suppose you create a real version of a file in workspace stream
gizmo_dvt_derek, and then promote this version to stream
gizmo_dvt. If you put a “from” lock on stream
gizmo_dvt_derek, you can still promote the version from stream
gizmo_dvt to another stream.
Use the unlock command to remove an existing lock. Placing a new lock on a stream automatically removes any existing lock of the same type. For example, if you issue the following commands, the result will be a “to” lock for everyone and a “from” lock for everyone except
john.
Disable all promotions to and from stream tulip_dvt; also disable include/exclude changes and
chstream changes:
Allow user mary to make promotions to stream
tulip_dvt, but disallow everyone else from doing so: