Get a list of jobs from the repository
Namespace: Perforce.P4Assembly: p4api.net (in p4api.net.dll) Version: 2015.1.103.4687 (2015.1.103.4687)
Syntax
C# |
---|
public IList<Job> GetJobs( Options options, params FileSpec[] files ) |
Visual Basic |
---|
Public Function GetJobs ( _ options As Options, _ ParamArray files As FileSpec() _ ) As IList(Of Job) |
Visual C++ |
---|
public: IList<Job^>^ GetJobs( Options^ options, ... array<FileSpec^>^ files ) |
Parameters
- options
- Type: Perforce.P4..::..Options
options for the jobs command[!:JobsOptions]
- files
- Type: array<Perforce.P4..::..FileSpec>[]()[][]
Return Value
A list containing the matching jobs
Remarks
p4 help jobs
jobs -- Display list of jobs
p4 jobs [-e jobview -i -l -m max -r] [file[revRange] ...]
p4 jobs -R
Lists jobs in the server. If a file specification is included, fixes
for submitted changelists affecting the specified files are listed.
The file specification can include wildcards and a revision range.
See 'p4 help revisions' for details about specifying revisions.
The -e flag lists jobs matching the expression specified in the
jobview parameter. For a description of jobview syntax, see 'p4 help
jobview'.
The -i flag includes any fixes made by changelists integrated into
the specified files.
The -l flag produces long output with the full text of the job
descriptions.
The -m max flag limits the output to the first 'max' jobs, ordered
by their job name.
The -r flag sorts the jobs in reverse order (by job name).
The -R flag rebuilds the jobs table and reindexes each job, which
is necessary after upgrading to 98.2. 'p4 jobs -R' requires that
that the user be an operator or have 'super' access granted by
'p4 protect'.
Examples
To get a list of 100 jobs that include files under a given filepath:
CopyC#
To get a list of 100 jobs with the status "open":
CopyC#
To get a list of 10 jobs in reverse order:
CopyC#
To get a list of 10 jobs that include any fixes made by changelists integrated into
the specified files:
CopyC#

FileSpec path = new FileSpec(new DepotPath(@"//depot/..."), null); IList<Job> jobs = rep.GetJobs((new Options(JobsCmdFlags.LongDescriptions, null, 100)), path);

string jobView = "status=open"; IList<Job> jobs = rep.GetJobs((new Options(JobsCmdFlags.LongDescriptions, jobView, 100)), path);

IList<Job> jobs = rep.GetJobs((new Options(JobsCmdFlags.ReverseSort, null, 10));

FileSpec path = new FileSpec(new DepotPath(@"//depot/..."), null); IList<Job> jobs = rep.GetJobs((new Options(JobsCmdFlags.IncludeIntegratedFixes, null, 10)), path);