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

Syntax

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

Parameters

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

Return Value

Remarks


p4 help revert

revert -- Discard changes from an opened file

p4 revert [-a -n -k -c changelist#] file ...

Revert an open file to the revision that was synced from the depot,
discarding any edits or integrations that have been made. You must
explicitly specify the files to be reverted. Files are removed from
the changelist in which they are open. Locked files are unlocked.

The -a flag reverts only files that are open for edit or integrate
and are unchanged or missing. Files with pending integration records
are left open. The file arguments are optional when -a is specified.

The -n flag displays a preview of the operation.

The -k flag marks the file as reverted in server metadata without
altering files in the client workspace.

The -c flag reverts files that are open in the specified changelist.

See Also