From: Ricardo Markiewicz Date: Tue, 2 Dec 2003 17:00:18 +0000 (+0000) Subject: * Se agrega opcion -d . Si es usada se arma todo en base a la salida del "svn log... X-Git-Tag: svn_import~35 X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/commitdiff_plain/712b98c33f9a4db7346e62203ca293ae5e7426a6?ds=inline * Se agrega opcion -d . Si es usada se arma todo en base a la salida del "svn log", si no, se usa el archivo ChangeLog * Ahora los resultados son reales ... Y sagar aparece mas seguido :-) --- diff --git a/log_trace.pl b/log_trace.pl index 428893b..f4a2d01 100755 --- a/log_trace.pl +++ b/log_trace.pl @@ -6,27 +6,31 @@ # # The PlaQui Development Team -#open("log.txt", LOG); -#@lines = ; -#close(LOG); +my %hash, %users, $texto. $max; -#$texto = `svn log | grep rev | grep lines`; -$texto = `cat log.txt | grep rev | grep lines`; +if (shift eq "-d") { + $texto = `svn log | grep rev | grep line`; +} else { + $texto = `cat ChangeLog | grep rev | grep line`; +} @lines = split(/\n/, $texto); -my %hash, %users; +$max = -1; foreach $line (@lines) { @datos = split(/ /, $line); $hash{$datos[5]}++; $users{$datos[5]}{$datos[3]}++; + if ($hash{$datos[5]} > $max) { + $max = $hash{$datos[5]}; + } } print "PlaQui - Grafica de Progreso SVN\n"; print "--------------------------------\n\n"; -print "Fecha Commits\n"; +print "Fech\t\tCommits\n"; foreach $date (sort keys %hash) { - print "$date "; + print "$date\t"; $win = ""; $win_pts = -1; @@ -35,22 +39,24 @@ foreach $date (sort keys %hash) { $win = $name; $win_pts = $users{$date}{$name}; } else { - if ($users{$date}{$name} = $win_pts) { + if ($users{$date}{$name} == $win_pts) { $win = $win."|".$name; } } } - #Imprimo el Ganador - - for($i=0; $i<$hash{$date}; $i++) { - print "*"; + for($i=0; $i<$max; $i++) { + if ($i < $hash{$date}) { + print "*"; + } else { + print " "; + } } - print "($win)"; + print " ($win)"; print "\n"; } print "\n"; -print "( ) = Máximo Commiteador del Día\n"; +print "( ) = Máximo/s Commiteador/es del Día\n"; print "* == 1 Commit\n";