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

百般思念 提交于 2019-12-22 04:30:21

问题


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 ?


回答1:


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




回答2:


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




回答3:


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.



来源:https://stackoverflow.com/questions/911739/how-to-find-changelists-submitted-in-the-last-week-for-a-particular-user-using-p

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!