p4 lock
Synopsis
Lock an opened file against other users submitting changes to the file.
Syntax
p4 [g-opts
] lock [-c
changelist
] [file
…]
p4 [g-opts
] lock -g -c
changelist
Description
Locking files prevents other users from submitting changes to those files. If the files are already locked by another user, p4 lock fails. When the user who locked a particular file submits the file, the lock is released.
This command is normally called with a specific file argument; if no file
argument is provided, all open files in the default changelist are locked.
If the -c
option is used, all open files matching the given file pattern in
changelist changelist
changelist
are locked.
In an edge/commit architecture, use the -g
flag to lock the files locally
and globally. This syntax variant may only be used from an edge server, and it must be used
with the -c
option. This lock is
removed by the p4 unlock -g command or by any submit command for the
specified changelist.
changelist
Options
|
Lock only files included in changelist
|
-g |
Lock files in an edge/commit architecture. See "Description" above. |
|
See “Global Options”. |
Usage Notes
Can File Arguments Use Revision Specifier? |
Can File Arguments Use Revision Range? |
Minimal Access Level Required |
---|---|---|
No |
No |
|