Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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 ?

like image 500
vivekian2 Avatar asked May 26 '09 17:05

vivekian2


People also ask

What is CL in Perforce?

When you check out a file, Perforce adds information about the file to a changelist and changes the writable attribute of the file in your local workspace from read-only to read/write. A changelist defines a logical grouping of work across a set of files and folders.

What does p4 Fstat do?

The p4 fstat command dumps information about each file, with information for each field on a separate line. The output is best used within a Helix C/C++ API application where the items can be accessed as variables, but is also suitable for parsing by scripts.

How can we edit a pending change list then submit it?

To submit a pending changelist, issue the p4 submit command. When you issue the p4 submit command, a form is displayed, listing the files in the changelist. You can remove files from this list. The files you remove remain open in the default pending changelist until you submit them or revert them.

What does p4 change do?

p4 change brings up a form for editing or viewing in the editor defined by the environment variable P4EDITOR . When no arguments are provided, this command creates a numbered changelist. All files open in the default changelist are moved to the numbered changelist.


2 Answers

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

like image 129
joshdick Avatar answered Dec 15 '22 01:12

joshdick


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.)

like image 44
idbrii Avatar answered Dec 15 '22 00:12

idbrii