How can I list all file versions, changelog and developer ID in the directory?

I am trying to get a list of all revisions for all files in a directory with this information:

  • Version number
  • Participant List Number
  • Developer ID

I tried to use the p4: p4 files -a files. > output.txt, but this command has no parameters to give me the developer id and change list number.

+2
source share
4 answers

Despite my requests for clarification, since I understand your question, I think you want to use p4 filelog :

 p4 -c <client-name> filelog ... > output.txt 

This will result in lines such as:

 //path/to/depot/file ... #15 change 384363 edit on 2011/04/06 by user.name@c-user.name-client (text) 'comment' ... #14 change 381364 edit on 2011/03/21 by user.name@c-user.name-client (text) 'comment' ... #13 change 375094 edit on 2011/02/16 by user.name@c-user.name-client (text) 'comment' ... #12 change 374246 edit on 2011/02/11 by user.name@c-user.name-client (text) 'comment' ... #11 change 374042 edit on 2011/02/11 by henrik.wist@c-henrik.wist-client (text) 'comment ... #10 change 373886 edit on 2011/02/10 by henrik.wist@c-henrik.wist-client (text) 'comment' ... #9 change 373567 edit on 2011/02/09 by max.ritter@c-max.ritter-all (text) 'comment' ... #8 change 373553 edit on 2011/02/09 by user.name@c-user.name-client (text) 'comment' ... #7 change 373350 edit on 2011/02/09 by user.name@c-user.name-client (text) 'comment' ... #6 change 370568 edit on 2011/01/25 by user.name@c-user.name-client (text) 'comment' ... #5 change 368223 edit on 2011/01/14 by user.name@c-user.name-client (text) 'comment' ... #4 change 365805 edit on 2010/12/21 by user.name@c-user.name-client (text) 'comment' ... #3 change 364494 edit on 2010/12/14 by henrik.wist@c-henrik.wist-client (text) 'comment' ... #2 change 362107 edit on 2010/12/02 by user.name@c-user.name-client (text) 'comment' ... #1 change 359972 add on 2010/11/23 by user.name@c-user.name-client (text) 'comment' 

for each file. If you only need the latest change, use

 `p4 -c <client-name> filelog -m 1 ... > output.txt 
+4
source

I don't have a Perforce console next to me, but what about

 p4 changes ... 

for the current directory down, or

 p4 changes dir_name/... 

for a shared directory.
I believe that he has the information you want.

0
source

There is no command that will give you the file name, version and user. Unfortunately, you can only get 2 out of 3. I think that it is best to write a script that uses p4 fstat and then does p4 describe in the change list lists to get the usernames.

0
source

Consider using P4Report to build such a composite query. With a fairly simple bit of SQL, you can extract the most volatile files, and you can combine with a query that shows the most active users. I think one of the standard reports that he sets up is for volatile files. But in any case, it is not difficult for yourself.

The link above is documentation — examples of requests that show how easy it is to use. It's free.

0
source

Source: https://habr.com/ru/post/913450/


All Articles