Kannan Ekanath
Kannan Ekanath

Reputation: 17621

p4 list jobs of a particular user

P4 Server 2010.2/347035

I am trying to list jobs that were created by me in p4. I was hoping the following command would work

p4 -u xxx jobs -m 50

but it does not. The above command does not list me jobs for that xxx user instead it just shows me all jobs.

Questions

  1. How can I list just my jobs? (Or a particular user's job)
  2. Is there any way to petty print output generated by p4? Most p4 commands have tabular output and I would like tabular output?

Upvotes: 0

Views: 309

Answers (3)

Bryan Pendleton
Bryan Pendleton

Reputation: 16359

You want something like 'p4 jobs -e ReportedBy=CalmStorm' or maybe 'p4 jobs -e OwnedBy=CalmStorm'.

Since the job spec is customizable, the exact syntax will depend on what fields you have defined for your jobspec.

Have a look at http://www.perforce.com/perforce/doc.current/manuals/cmdref/jobs.html#1040665 for more information about the jobs query language.

Regarding pretty-printing, there isn't anything built into the command line itself. Many users use a scripting tool such as Perl, Python, or Ruby for these purposes; there are Perforce packages for all the major scripting languages so you can pick your favorite one. Or use P4V -- it's got a nice GUI for searching and viewing jobs.

Upvotes: 1

pitseeker
pitseeker

Reputation: 2563

You could grep for your name in the jobs list:

p4 jobs |grep $P4USER

Upvotes: 0

Kannan Ekanath
Kannan Ekanath

Reputation: 17621

The command

p4 jobs -r -m 100 -e xxx

kinda achieves this but it lists jobs assigned to me not just the ones created by me.

Upvotes: 0

Related Questions