How can I see a unified log of changes to a set of files in perforce?

拥有回忆 提交于 2019-12-07 04:38:15

问题


I'm new to perforce, coming from a history of cvs->svn->git. I'm having a difficult time seeing a compact representation of the most recent changes impacting a set of file. For instance, if I go to a directory and type:

% p4 filelog .

It doesn't do anything useful. More interesting is

% p4 filelog *

However this shows me the change history of every file individually. I'd rather see a unified view of changes in a format showing: change number, submit message, changed files for the most recent N submits.


回答1:


You can almost get this with:

p4 changes -lt [file[RevRange]...]

This will show you the changelists that affected the files in question. It doesn't show which files were affected by each change, however. You could write a script that took the output of p4 changes and used p4 describe -s to get the file listing for each changelist.

Note that p4 changes includes pending changes by default. Add -s submitted for only submitted changelists. There are other flags to narrow it down further, like -u username and -m max (to limit the number of changelists returned -- it returns newest first).




回答2:


To list the files that have changed between your @start,@stop times,

p4 -c WORKSPACENAME files //Path/You/Care/About/...@2013/03/20:13:40,@2014/06/016:17:00



来源:https://stackoverflow.com/questions/4443638/how-can-i-see-a-unified-log-of-changes-to-a-set-of-files-in-perforce

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