qlock (see also)

Use qlock to lock a revision in a QVCS archive to prevent multiple edits to the same source revision. You can also use it preceding a qput that stores a new QVCS archive revision if you did not perform a locking qget earlier.

QVCS allows multiple locks within a single QVCS archive. A single individual can only hold one of those locks at a time. For example, if both Jane and Joe are on the access list for a QVCS archive, Jane can have one revision locked at the same time that Joe has a different revision within the same QVCS archive locked. If either Jane or Joe tried to get an additional lock on that same QVCS archive, QVCS would deny the request since a single individual can only hold one lock at a time per QVCS archive.

Unlike qget with the -l switch, qlock does not alter the writable attribute of any work file associated with the QVCS archive unless you use the -readwrite command line option.

For QVCS archives that have the CHECKLOCK attribute disabled, qlock doesn't do anything.

qlock won't allow you to lock an obsolete archive.

To unlock a locked QVCS archive, either add a revision to it using qput or QWin, or unlock the revision using qunlock or QWin's undo check-out.

Command Template

qlock [-r REVISION]|[-label "LABEL"] [-readwrite] filename

where:

-r REVISION (optional, cannot be used with ?label)

Indicates the revision to be locked. If not specified, qlock will lock the newest revision on the default branch of the specified QVCS archive.

-label LABEL (optional, cannot be used with ?r)

Indicates a label; if the label is more than a single word, enclose it in single or double quotes. qget will lock the revision associated with the given label string.

-readwrite (optional)

Changes the work file to be read/write.

filename (required)

The work file associated with the QVCS archive in which you want to lock a revision.

The filename can make use of the wildcard character * in order to perform the operation on all applicable files in the current directory, all files of a certain extension (e.g. *.cpp), etc.

Examples

qlock foobar.c
locks the latest revision in foobar.c's QVCS archive.

qlock *
locks the latest revision on the default branch of all QVCS archives accessible from the current directory.

qlock -r 1.3 foobar.c
locks revision 1.3 of foobar.c's QVCS archive. This command could be used to lock a revision prior to creating a branch that begins at revision 1.3. If followed by a qput from the same individual, and revision 1.3 is not the newest revision, qput creates a new branch whose branch point is the 1.3 revision on the trunk.

qlock -label "Release 2.0" foobar.c
locks the revision in foobar.c that is associated with the "Release 2.0" label.


Command Line Utilities
qdelrevqdiffqeditqgetqidentqlockqlogqmergeqmodhdrqmodrevqputqstampqunlockqunstampqrecurse


See also: QWin's corresponding Lock tool.