X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/712b98c33f9a4db7346e62203ca293ae5e7426a6..44617167ac216781537290dce9cc097df89dc3d2:/log_trace.pl diff --git a/log_trace.pl b/log_trace.pl index f4a2d01..003517c 100755 --- a/log_trace.pl +++ b/log_trace.pl @@ -6,13 +6,13 @@ # # The PlaQui Development Team -my %hash, %users, $texto. $max; +my %hash, %users, %commits, %lines_count, $texto. $max; if (shift eq "-d") { - $texto = `svn log | grep rev | grep line`; -} else { - $texto = `cat ChangeLog | grep rev | grep line`; + $texto = `svn log > ChangeLog`; } +$texto = `egrep "rev [0-9]+" ChangeLog`; + @lines = split(/\n/, $texto); $max = -1; @@ -20,6 +20,8 @@ foreach $line (@lines) { @datos = split(/ /, $line); $hash{$datos[5]}++; $users{$datos[5]}{$datos[3]}++; + $commits{$datos[3]}++; + $lines_count{$datos[3]} += $datos[13]; if ($hash{$datos[5]} > $max) { $max = $hash{$datos[5]}; } @@ -27,7 +29,7 @@ foreach $line (@lines) { print "PlaQui - Grafica de Progreso SVN\n"; print "--------------------------------\n\n"; -print "Fech\t\tCommits\n"; +print "Fecha\t\tCommits\n"; foreach $date (sort keys %hash) { print "$date\t"; @@ -45,8 +47,8 @@ foreach $date (sort keys %hash) { } } - for($i=0; $i<$max; $i++) { - if ($i < $hash{$date}) { + for($i=0; $i<$max/2; $i++) { + if ($i < $hash{$date}/2) { print "*"; } else { print " "; @@ -57,6 +59,11 @@ foreach $date (sort keys %hash) { } print "\n"; -print "( ) = Máximo/s Commiteador/es del Día\n"; -print "* == 1 Commit\n"; +print "Cantidad de commits por usuario:\n"; +foreach $user (sort keys %commits) { + print "\t$user\t$commits{$user}\t($lines_count{$user} lineas)\n"; +} +print "\n"; +print "( ) = Máximo/s Commiteador/es del Día | "; +print "* == 2 Commit\n";