ClientUnlockFiles Method (Options, FileSpec)
|
Namespace:
Perforce.P4
Assembly:
p4api.net (in p4api.net.dll) Version: 2024.1.261.8274
Syntaxpublic IList<FileSpec> UnlockFiles(
Options options,
params FileSpec[] files
)
Public Function UnlockFiles (
options As Options,
ParamArray files As FileSpec()
) As IList(Of FileSpec)
public:
IList<FileSpec^>^ UnlockFiles(
Options^ options,
... array<FileSpec^>^ files
)
member UnlockFiles :
options : Options *
files : FileSpec[] -> IList<FileSpec>
Parameters
- options
- Type: Perforce.P4Options
- files
- Type: Perforce.P4FileSpec
Return Value
Type:
IListFileSpec
Remarks
p4 help unlock
unlock -- Release a locked file, leaving it open
p4 unlock [-c | -s changelist# | -x] [-f] [file ...]
p4 -c client unlock [-f] -r
'p4 unlock' releases locks on the specified files, which must be
open in the specified pending changelist. If you omit the changelist
number, the default changelist is assumed. If you omit the file name,
all locked files are unlocked.
The -s flag unlocks files from a shelved changelist caused by an
aborted 'submit -e' operation. The -c flag applies to opened files
in a pending changelist locked by 'p4 lock' or by a failed submit
of a change that is not shelved.
By default, files can be unlocked only by the changelist owner who
must also be the person who has the files locked. The -f flag
enables you to unlock files in changelists owned by other users.
The -f flag requires 'admin' access, which is granted by 'p4
protect'.
The -x option unlocks files that are opened 'exclusive' but are
orphaned (see 'p4 opened -x'). This option only applies to a
distributed installation where global tracking of these file types
is necessary across servers.
If a push command from a remote server to this server fails, files
can be left locked on this server, preventing other users from
submitting changes to those files. In this case, the user who issued
the push command can specify the -r flag with the name of the client
that was used on that remote server to unlock the files on this
server. An administrator can run 'unlock -f -r' as well.
See Also