vivekian2
vivekian2

Reputation: 3954

How to find changelists submitted in the last week for a particular user using Perforce?

Is there a way to ask Perforce to list all changelists submitted by a particular user in a specific time frame ?

p4 changes @2001/04/01,@now This lists all the changes submitted from 1st April till now.

p4 changes -m 5 -u edk Shows the last five submitted changelists from user edk.

Is there a way to combine both the above for a particular directory ?

Upvotes: 9

Views: 6912

Answers (3)

Kamala Sowmya
Kamala Sowmya

Reputation: 21

If you want to get changes in a particular time frame,

Example : p4 changes -u abc -s submitted @2015/09/01:12:02:49,2015/10/01:11:20:55

This should list the submitted changes of 'abc' in the give time frame, that is from : 2015/09/01 12:02:49 to 2015/10/01 11:20:55. Note the ':' which concatenates the date and time.

Upvotes: 2

idbrii
idbrii

Reputation: 11946

If you're using bash, you can script the whole command:

p4 changes -l -i -m 50 -u $USERNAME -s submitted @`date --date="1 week ago" +"%Y/%m/%d"`,@now

(I'm also using -l to include the full commit message.)

Upvotes: 4

joshdick
joshdick

Reputation: 1071

You can combine them like so:

p4 changes -m 5 -u edk -s submitted @2001/04/01,@now

To specify a directory:

p4 changes -m 5 -u edk -s submitted //depot/path/to/directory/...@2001/04/01,@now

Upvotes: 11

Related Questions