Is there a single Perforce command to display a list of all the check-ins to a file/dir along with the list of files that changed and the description?

假装没事ソ 提交于 2019-12-10 20:52:22

问题


p4 changes -l ... shows us the list of check-ins and the description, but it doesn't show the list of files that were modified in the check-in. Is there a way to do that in one command, without the need to create a wrapper script that combines the output of another command like p4 describe or p4 file?

In Subversion, I can do this by running svn log -v.


回答1:


The 'files' command can do what you're looking for. An easy way is:

p4 files //...@=<changelist>

That example will list the files modified by that changelist, under the view specified.




回答2:


You can use the "describe" command to get the description of a changelist, along with the files affected.

For example, p4 describe -s <changelist> will describe the changelist, and the "-s" will prevent it from displaying file diffs.




回答3:


One liner, list all changes made to a branch, with description and list of affected files, without showing the diff. Thanks to a combination of answers. Works on windows with Unix utils

p4 changes -s submitted //depot/xxx/yyy/zzz/... | grep -o "^Change [0-9]*" | cut -f2 -d" "  | p4 -x- describe -s

Output:

Change 1753385 by user@clientspec on 2019/03/08 06:29:44

Changing the world

Affected files ...

... //depot/xx/yy/zz.h#6 edit

Change 1751752 by name@clientspec on 2019/03/05 15:24:00

I made a change to a file

Affected files ...

... //depot/xx/yy/zz.h#3 integrate



来源:https://stackoverflow.com/questions/6962887/is-there-a-single-perforce-command-to-display-a-list-of-all-the-check-ins-to-a-f

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