]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
More detailed commit graph :-))
authorMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 18 Apr 2008 15:02:40 +0000 (17:02 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 18 Apr 2008 15:02:40 +0000 (17:02 +0200)
build/_infrastructure/commit-graph.pl

index bb7a8fc5f41f374547d36e812030cfa64f4b3c5e..613ddfcc8063135514cab8e33744eb301b57d7c5 100755 (executable)
@@ -1,7 +1,5 @@
 #!/usr/bin/perl -w
 
-@commits = `git log --pretty=format:"%ct"|sort -n`;
-$i = 1;
 open GNUPLOT, "|gnuplot -persist";
 print GNUPLOT <<EOF;
 set xdata time
@@ -9,15 +7,24 @@ set timefmt "%s"
 set format x "%m/%y" 
 set xlabel "Date"
 set ylabel "Commit number"
-plot '-' using 1:2 notitle
+set grid
 EOF
-foreach (@commits) {
-    chop;
-    print GNUPLOT "$_ $i\n";
-    $i++;
+@authors = qw/sojka zidek tran ./;
+@plots = ();
+foreach $author(@authors) {
+       push @plots, qq/'-' using 1:2 title "$author"/;
+}
+print GNUPLOT "plot ", join(", ", @plots), ";\n";
+foreach $author(@authors) {
+       @commits = `git log --pretty=format:"%ct" --author=$author|sort -n`;
+       $i = 1;
+       foreach (@commits) {
+           chop;
+           print GNUPLOT "$_ $i\n";
+           $i++;
+       }
+       print GNUPLOT "e\n";
 }
-print GNUPLOT "e\n";
-
 #            set xdata time
 #            set timefmt "%m/%d/%y"
 #            set xrange ["03/21/95":"03/22/95"]