diff --git a/mozilla/webtools/tinderbox/warnings.pl b/mozilla/webtools/tinderbox/warnings.pl
index d48e41373fe..bd92e852ad5 100755
--- a/mozilla/webtools/tinderbox/warnings.pl
+++ b/mozilla/webtools/tinderbox/warnings.pl
@@ -204,7 +204,7 @@ sub build_blame {
while (my ($line, $warn_rec) = each %{$lines_hash}) {
my $line_rev = $revision_map[$line-1];
my $who = $revision_author{$line_rev};
- my $source_text = join '', @text[$line-4..$line+2];
+ my $source_text = join '', @text[$line-3..$line+1];
chomp $source_text;
$who = "$who%netscape.com" unless $who =~ /[%]/;
@@ -233,6 +233,10 @@ sub print_warnings_as_html {
Blamed Build Warnings
+
+
@@ -249,28 +253,30 @@ __END_HEADER
|| $a cmp $b } keys %who_count) {
push @who_list, $who;
}
+
# Summary Table (name, count)
#
- print "";
+ use POSIX;
+ print "\n";
my $num_columns = 6;
- my $num_per_column = $#who_list / $num_columns;
- for (my $ii=0; $ii <= $num_per_column; $ii++) {
+ my $num_rows = ceil($#who_list / $num_columns);
+ for (my $ii=0; $ii < $num_rows; $ii++) {
print "";
for (my $jj=0; $jj < $num_columns; $jj++) {
- my $index = $ii+$jj*$num_per_column + 1;
+ my $index = $ii + $jj * $num_rows;
next if $index > $#who_list;
- my $who = $who_list[$index];
- my $count = $who_count{$who};
- my $name = $who;
+ my $name = $who_list[$index];
+ my $count = $who_count{$name};
$name =~ s/%.*//;
+ print " " x $jj;
print "| $name";
print " | ";
print "$count";
- print " | | ";
+ print " | \n";
}
- print "
";
+ print "\n";
}
- print "
";
+ print "
\n";
# Print all the warnings
#
@@ -280,11 +286,11 @@ __END_HEADER
($name = $who) =~ s/%.*//;
($email = $who) =~ s/%/@/;
- print "";
+ print "";
print "$name";
print " (1 warning)" if $count == 1;
print " ($count warnings)" if $count > 1;
- print "
";
+ print "";
print "\n
\n";
for $file (sort keys %{$warnings_by_who{$who}}) {
@@ -306,9 +312,9 @@ __END_HEADER
$total_unblamed_warnings++;
}
}
- print "";
+ print ""
print "Unblamed ($total_unblamed_warnings warnings)";
- print "
";
+ print "";
print "";
for my $file (sort keys %unblamed) {
for my $linenum (sort keys %{$warnings{$file}}) {
@@ -339,14 +345,14 @@ sub print_warning {
# File link
if ($file =~ /\[multiple\]/) {
$file =~ s/\[multiple\]//;
- print "";
+ print "";
print "$file:$linenum";
print " (multiple file matches)";
} elsif ($file =~ /\[no_match\]/) {
- $file =~ s/.\[no_match\]//;
+ $file =~ s/\[no_match\]//;
print "$file:$linenum (no file match)";
} else {
- print "";
print "$file:$linenum";
print " ";
@@ -358,9 +364,9 @@ sub print_warning {
my $log_line = $warn_rec->{first_seen_line};
print " (";
+ ."'>";
if ($warn_rec->{count} == 1) {
- print "See build log";
+ print "See build log excerpt";
} else {
print "See 1st of $warn_rec->{count} occurrences in build log";
}
@@ -374,12 +380,12 @@ sub print_source_code {
# Source code fragment
#
my ($keyword) = $warning =~ /\`([^\']*)\'/;
- print "";
+ print "";
print "";
my $source_text = $warn_rec->{source};
my @source_lines = split /\n/, $source_text;
- my $line_index = $linenum - 3;
+ my $line_index = $linenum - 2;
for $line (@source_lines) {
$line =~ s/&/&/g;
$line =~ s/</g;
@@ -390,7 +396,8 @@ sub print_source_code {
print "" if $line_index == $linenum;
$line_index++;
}
- print ""; #";
+ print "";
+ #print "";
print " | \n";
}
@@ -400,19 +407,13 @@ sub build_url {
my $name = $br->{buildname};
$name =~ s/ /%20/g;
- return "http://tinderbox.mozilla.org/showlog.cgi?tree=$tree"
- ."&logfile=$br->{logfile}"
- ."&errorparser=$br->{errorparser}"
- ."&buildname=$name"
- ."&buildtime=$br->{buildtime}"
- ."&line=$linenum"
- ."&numlines=50";
+ return "../showlog.cgi?exerpt=$tree/$br->{logfile}:$linenum";
}
sub file_url {
my ($file, $linenum) = @_;
- return "http://cvs-mirror.mozilla.org/webtools/bonsai/cvsblame.cgi"
+ return "../bonsai/cvsblame.cgi"
."?file=mozilla/$file&mark=$linenum#".($linenum-10);
}
|