From e4c13585f3945c391e26d7d26c70c2d4e6f3a4c8 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Wed, 3 Dec 2003 20:58:25 +0000 Subject: [PATCH] Se agrega el log_trace aportado por Ricardo Markiewicz del PlaQui Development Team. --- log_trace/log_trace.pl | 66 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100755 log_trace/log_trace.pl diff --git a/log_trace/log_trace.pl b/log_trace/log_trace.pl new file mode 100755 index 0000000..99623fe --- /dev/null +++ b/log_trace/log_trace.pl @@ -0,0 +1,66 @@ +#!/usr/bin/perl +# +# Scrip que muestra en forma grafica la evolucion de los commits +# +# by Ricardo Markiewicz +# +# The PlaQui Development Team +# +# $Id$ + +my %hash, %users, $texto. $max; + +if (shift eq "-d") { + $texto = `svn log > ChangeLog`; +} +$texto = `egrep r[0-9]+ ChangeLog`; + +@lines = split(/\n/, $texto); + +$max = -1; +foreach $line (@lines) { + @datos = split(/ /, $line); + $hash{$datos[4]}++; + $users{$datos[4]}{$datos[2]}++; + if ($hash{$datos[4]} > $max) { + $max = $hash{$datos[4]}; + } +} + +print "PlaQui - Grafica de Progreso SVN\n"; +print "--------------------------------\n\n"; +print "Fecha\t\tCantidad de Commits\n"; +foreach $date (sort keys %hash) { + print "$date\t"; + + $win = ""; + $win_pts = -1; + foreach $name (keys %{$users{$date}}) { + if ($users{$date}{$name} > $win_pts) { + $win = $name; + $win_pts = $users{$date}{$name}; + } else { + if ($users{$date}{$name} == $win_pts) { + $win = $win."|".$name; + } + } + } + + for($i=0; $i<$max; $i++) { + if ($i < $hash{$date}) { + print "*"; + } else { + print " "; + } + } + print " ($win)"; + print "\n"; +} + +print "\n"; +print "Cantidad de commits por usuario:\n"; +print `egrep r[0-9]+ ChangeLog | awk '{print \$3}' | sort | uniq -c | sort -r`; +print "\n"; +print "( ) = Máximo/s Commiteador/es del Día | "; +print "* == 1 Commit\n"; + -- 2.43.0