如何在 perforce 中查看一组文件更改的统一日志? [英] How can I see a unified log of changes to a set of files in perforce?

查看:93
本文介绍了如何在 perforce 中查看一组文件更改的统一日志?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 perforce 的新手,来自 cvs->svn->git 的历史.我很难看到影响一组文件的最新更改的紧凑表示.例如,如果我转到一个目录并键入:

% p4 文件日志.

它没有做任何有用的事情.更有趣的是

% p4 文件日志 *

然而,这向我显示了每个文件的更改历史记录.我宁愿看到一个统一的更改视图,格式显示:更改编号、提交消息、最近 N 次提交的更改文件.

解决方案

你几乎可以通过:

p4 更改 -lt [file[RevRange]...]

这将显示影响相关文件的更改列表.但是,它没有显示哪些文件受到每次更改的影响.您可以编写一个脚本来获取 p4 更改 的输出并使用 p4 describe -s 来获取每个更改列表的文件列表.

请注意,p4 changes 默认包括待处理的更改.添加 -s 提交 仅用于提交的更改列表.还有其他标志可以进一步缩小范围,例如 -u username-m max (用于限制返回的更改列表的数量——它首先返回最新的).

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.

解决方案

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

这篇关于如何在 perforce 中查看一组文件更改的统一日志?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆