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 ?
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.
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.
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.
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.
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
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.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With