Perforce 2000.2 Command Reference (2000.2.cr.1)
<< Previous Chapter
p4 labelsync
Table of Contents
Index
Perforce on the Web
Next Chapter >>
p4 obliterate

p4 lock


Synopsis

Lock an opened file against changelist submission

Syntax

p4 [g-opts] lock [-c changelist#] [file ...]

Description

Locking files prevents all other users from submitting changes to those files. If the files are already locked by another user, p4 lock will fail. 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 will be locked. If the -c changelist# flag is used, all open files matching the given file pattern in changelist changelist# will be locked.

Options

-c changelist#

Lock only files included in changelist changelist#

g_opts

See the Global Options section.

Usage Notes

Can File Arguments Use
Revision Specifier?

Can File Arguments Use
Revision Range?

Minimal Access Level Required

No

No

write

Related Commands

To unlock locked files

p4 unlock


Perforce 2000.2 Command Reference (2000.2.cr.1)
<< Previous Chapter
p4 labelsync
Table of Contents
Index
Perforce on the Web
Next Chapter >>
p4 obliterate
Please send comments and questions about this manual to [email protected].
Copyright 1997, 2000 Perforce Software. All rights reserved.
Last updated: 12/21/00