如何在 perforce 中查看一组文件更改的统一日志?
我是 perforce 的新手,来自 cvs->svn->git 的历史。我很难看到影响一组文件的最新更改的紧凑表示。例如,如果我进入一个目录并输入:
% p4 filelog .
它不会做任何有用的事情。更有趣的是
% p4 filelog *
,但这向我单独显示了每个文件的更改历史记录。我宁愿看到一个统一的更改视图,其格式显示:更改编号、提交消息、最近 N 次提交的更改文件。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您几乎可以通过以下方式得到:
这将向您显示影响相关文件的更改列表。但是,它没有显示哪些文件受到每次更改的影响。您可以编写一个脚本,获取
p4changes
的输出,并使用p4describe-s
获取每个变更列表的文件列表。请注意,默认情况下,
p4 更改
包括待处理的更改。仅针对已提交的变更列表添加-s Submitted
。还有其他标志可以进一步缩小范围,例如-u username
和-m max
(限制返回的更改列表的数量 - 它首先返回最新的)。You can almost get this with:
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 usedp4 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).要列出在 @start、@stop 时间之间更改的文件,
p4 -c WORKSPACENAME files //Path/You/Care/About/...@2013/03/20:13:40,@2014 /06/016:17:00
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