Changeset 422 for trunk/doc


Ignore:
Timestamp:
Dec 2, 2005, 12:39:32 PM (16 years ago)
Author:
Peter
Message:

Fixed statistics script. png generation must be fixed.

Location:
trunk/doc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/svnplot.pl

    r414 r422  
    33use strict;
    44
     5
    56open(INPUT,'date.tmp');
    6 my @dates;
    7 $dates[0]=0;
     7my @dates; # key: revision - value: date
     8$dates[0]="2003-02-19";
    89while (my $row = <INPUT>) {
    9     my @line=split(" ",$row);
    10     if (@line>4){
    11   my @line2 = split(/\D/,$line[0]);
    12   $dates[$line2[1]]=$line[4];
    13   print "$line2[1] -> $line[4]\n";
     10    my @line=split('\|',$row);
     11    if (@line==3) {
     12  my @line2 = split(/\s/,$line[2]);
     13  my $revno=substr($line[0],1);
     14  $dates[$revno]=$line2[1];
    1415    }
    1516}
     
    1718
    1819
     20# defining dates for revisions not checked (revs between our check-ins)
     21# revisions outside this directory
    1922for (my $i=1; $i<@dates; $i++)
    2023{
    21     if (defined($dates[$i])){
    22   $dates[$i]=$dates[$i];
    23     }
    24     else{
     24    if (!defined($dates[$i])) {
    2525  $dates[$i]=$dates[$i-1];
    2626    }
     
    2929
    3030
     31# mapping name to idnr
    3132open(INPUT,'svnstat.tmp2');
    32 
    33 my $r=0;
    3433my %idnr=(); #hash - key: name - value: id
    3534my $count=0;
     
    4039while (my $row = <INPUT>) {
    4140    my @line=split(" ",$row);
    42 
    4341    if ($idnr{$line[1]}){
    4442  $id = $idnr{$line[1]};
     
    5149    }
    5250}
    53 
    5451close(INPUT);
    5552
     53
     54# creating array
    5655my @nof_lines;
    5756for (my $i=0; $i<$nof_idnr; $i++)
    5857{
    59    
    6058    $nof_lines[$i]=0;
    6159}
     
    6361open (MYOUT,'>svnstat.tmp3');
    6462open(INPUT,'svnstat.tmp2');
     63my $r=0;
    6564while (my $row = <INPUT>) {
    6665    my @line=split(" ",$row);
     
    8988}
    9089close(INPUT);
     90if ($dates[$r]){
     91    print MYOUT $dates[$r];
     92    print MYOUT " ";
     93    print MYOUT $r;
     94    print MYOUT " ";
     95    print MYOUT $count;
     96    print MYOUT " ";
     97    foreach my $number (@nof_lines) {
     98  print MYOUT $number;
     99  print MYOUT " ";
     100    }
     101    print MYOUT "\n";
     102}
    91103
    92104
     
    112124set yrange [0:*]
    113125set ytics
    114 set term post color "Times" 18
    115 set output 'svnplot.ps'
     126set term post color
     127set output 'svnplot.png'
    116128$PLOT
    117129
  • trunk/doc/svnplot.sh

    r414 r422  
    22
    33cd ..
    4 touch svnstat.tmp1
    5 rm svnstat.tmp1
    64
    75echo "Extracting log information."
     6# sort only used to remove duplicates
    87svn log -q | sort -u > lib/date.tmp
    98cd lib
     
    1514echo "Plotting."
    1615../doc/svnplot.pl
    17 #gnuplot svnplot.gpt
    18 convert svnplot.ps -rotate 90 svnplot.png
    1916
    2017mv svnplot.png ../doc/html/.
    2118
    22 #rm svnstat.tmp1
    23 #rm svnstat.tmp2
    24 #rm svnstat.tmp3
    25 #rm files.tmp
    26 #rm date.tmp
    27 #rm svnplot.ps
     19rm svnstat.tmp1
     20rm svnstat.tmp2
     21rm svnstat.tmp3
     22rm files.tmp
     23rm date.tmp
     24rm svnplot.ps
Note: See TracChangeset for help on using the changeset viewer.