List fixes affecting files and / or jobs and / or changelists.

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

Syntax

C#
public IList<Fix> GetFixes(
	IList<FileSpec> filespecs,
	Options options
)
Visual Basic
Public Function GetFixes ( _
	filespecs As IList(Of FileSpec), _
	options As Options _
) As IList(Of Fix)
Visual C++
public:
IList<Fix^>^ GetFixes(
	IList<FileSpec^>^ filespecs, 
	Options^ options
)

Parameters

filespecs
Type: System.Collections.Generic..::..IList<(Of <(<'FileSpec>)>)>
options
Type: Perforce.P4..::..Options

Return Value

Remarks


p4 help fixes

fixes -- List jobs with fixes and the changelists that fix them

p4 fixes [-i -m max -c changelist# -j jobName] [file[revRange] ...]

'p4 fixes' list fixed jobs and the number of the changelist that
contains the fix. Fixes are associated with changelists using the
'p4 fix' command or by editing and submitting changelists.

The 'p4 fixes' command lists both submitted and pending changelists.

By default, 'p4 fixes' lists all fixes. This list can be limited
as follows: to list fixes for a specified job, use the -j jobName
flag. To list fixes for a specified changelist, use -c changelist#.
To list fixes that affect specified files, include the file argument.
The file pattern can include wildcards and revision specifiers. For
details about revision specifiers, see 'p4 help revisions'

The -i flag also includes any fixes made by changelists integrated
into the specified files.

The -m max flag limits output to the specified number of job
fixes.

Examples

To list the fixes related to job000001:
CopyC#
   GetFixesCmdOptions opts = 
   new GetFixesCmdOptions(GetFixesCmdFlags.None, 0, "job000001", 0);

FileSpec filespec =
new FileSpec(new DepotPath("//..."), null);
IList<FileSpec> filespecs = new List<FileSpec>();
filespecs.Add(filespec);

   IList<Fix> target = Repository.GetFixes(filespecs, opts);
To list the fixes related to changelist 47921:
CopyC#
   GetFixesCmdOptions opts = 
   new GetFixesCmdOptions(GetFixesCmdFlags.None, 47921, null, 0);

FileSpec filespec =
new FileSpec(new DepotPath("//..."), null);
IList<FileSpec> filespecs = new List<FileSpec>();
filespecs.Add(filespec);

   IList<Fix> target = Repository.GetFixes(filespecs, opts);
To list the fixes related to path //depot/rel/src that occurred between 2014/1/1 and 2014/1/31:
CopyC#
   GetFixesCmdOptions opts = 
   new GetFixesCmdOptions(GetFixesCmdFlags.None, 0, null, 0);

VersionRange vr = new VersionRange(new DateTimeVersion(new DateTime(2014, 1, 1)),
new DateTimeVersion(new DateTime(2014, 1, 31)));

FileSpec filespec =
new FileSpec(new DepotPath("//..."), vr);
IList<FileSpec> filespecs = new List<FileSpec>();
filespecs.Add(filespec);

   IList<Fix> target = Repository.GetFixes(filespecs, opts);

See Also