Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

perforce

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.

like image 580
Nick Avatar asked Dec 14 '10 20:12

Nick


1 Answers

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

like image 110
Laurence Gonsalves Avatar answered Oct 14 '22 21:10

Laurence Gonsalves