Namespace: Perforce.P4
Assembly: p4api.net (in p4api.net.dll) Version: 2015.1.103.4687 (2015.1.103.4687)

Syntax

C#
public IList<FileSpec> ShelveFiles(
	Options options,
	params FileSpec[] files
)
Visual Basic
Public Function ShelveFiles ( _
	options As Options, _
	ParamArray files As FileSpec() _
) As IList(Of FileSpec)
Visual C++
public:
IList<FileSpec^>^ ShelveFiles(
	Options^ options, 
	... array<FileSpec^>^ files
)

Parameters

options
Type: Perforce.P4..::..Options
files
Type: array<Perforce.P4..::..FileSpec>[]()[][]

Return Value

Remarks


p4 help shelve

shelve -- Store files from a pending changelist into the depot

p4 shelve [files]
p4 shelve -i [-f | -r]
p4 shelve -r -c changelist#
p4 shelve -c changelist# [-f] [file ...]
p4 shelve -d -c changelist# [-f] [file ...]

'p4 shelve' creates, modifies or deletes shelved files in a pending
changelist. Shelved files remain in the depot until they are deleted
(using 'p4 shelve -d') or replaced by subsequent shelve commands.
After 'p4 shelve', the user can revert the files and restore them
later using 'p4 unshelve'. Other users can 'p4 unshelve' the stored
files into their own workspaces.

Files that have been shelved can be accessed by the 'p4 diff',
'p4 diff2', 'p4 files' and 'p4 print' commands using the revision
specification '@=change', where 'change' is the pending changelist
number.

By default, 'p4 shelve' creates a changelist, adds files from the
user's default changelist, then shelves those files in the depot.
The user is presented with a text changelist form displayed using
the editor configured using the $P4EDITOR environment variable.

If a file pattern is specified, 'p4 shelve' shelves the files that
match the pattern.

The -i flag reads the pending changelist specification with shelved
files from the standard input. The user's editor is not invoked.
To modify an existing changelist with shelved files, specify the
changelist number using the -c flag.

The -c flag specifies the pending changelist that contains shelved
files to be created, deleted, or modified. Only the user and client
of the pending changelist can add or modify its shelved files.

The -f (force) flag must be used with the -c or -i flag to overwrite
any existing shelved files in a pending changelist.

The -r flag (used with -c or -i) enables you to replace all shelved
files in that changelist with the files opened in your own workspace
at that changelist number. Only the user and client workspace of the
pending changelist can replace its shelved files.

The -d flag (used with -c) deletes the shelved files in the specified
changelist so that they can no longer be unshelved. By default, only
the user and client of the pending changelist can delete its shelved
files. A user with 'admin' access can delete shelved files by including
the -f flag to force the operation.

See Also