yowko / gource

Automatically exported from code.google.com/p/gource
0 stars 0 forks source link

Perforce support #99

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If you are interested, the following bash+awk script provides Perforce support 
for Gource. The output is generated in the custom log format. Maybe you want to 
add the script in some corner of your documentation.

p4 changes ...|awk '{print $2}'|p4 -x - describe -s|awk '(/^Change / || /^... 
/) {if ($1 == "Change") {u=substr($4,1,index($4,"@")-1); t = $(NF-1) " " $NF; 
gsub("/"," ",t); gsub(":"," ",t);time=mktime(t);} else {if ($NF=="add") 
{c="A";} else if ($NF=="delete") {c="D";} else 
{c="M";};f=substr($2,3,index($2,"#")-3);print time "|" u "|" c "|" f;}}'|sort -n

Thanks a lot for your great tool!

Original issue reported on code.google.com by olaf.kum...@coremedia.com on 21 Sep 2010 at 3:25

GoogleCodeExporter commented 9 years ago
Hi. Thanks I've just this on the custom log wiki page:

http://code.google.com/p/gource/wiki/CustomLogFormat

Original comment by acaudw...@gmail.com on 27 Sep 2010 at 1:02