diff --git a/mozilla/webtools/tinderbox/globals.pl b/mozilla/webtools/tinderbox/globals.pl index 8644aff0804..c7e52d9e5da 100755 --- a/mozilla/webtools/tinderbox/globals.pl +++ b/mozilla/webtools/tinderbox/globals.pl @@ -186,8 +186,8 @@ sub load_data { } sub load_buildlog { - local($mailtime, $buildtime, $buildname, $errorparser, $buildstatus, $logfile,$binaryname); - local($buildrec, @treelist, $t); + my ($mailtime, $buildtime, $buildname, $errorparser, $buildstatus, $logfile,$binaryname); + my ($buildrec, @treelist, $t); if( $tree2 ne '' ){ @treelist = ($td1, $td2); @@ -206,6 +206,10 @@ sub load_buildlog { chomp; ($mailtime, $buildtime, $buildname, $errorparser, $buildstatus, $logfile, $binaryname) = split( /\|/ ); + # Ignore stuff in the future. + next if $buildtime > $maxdate; + + # Ignore stuff in the past if ($buildtime < $mindate) { # Occasionally, a build might show up with a bogus time. So, # we won't judge ourselves as having hit the end until we diff --git a/mozilla/webtools/tinderbox/showbuilds.cgi b/mozilla/webtools/tinderbox/showbuilds.cgi index 468718c89ad..f91f5d24289 100755 --- a/mozilla/webtools/tinderbox/showbuilds.cgi +++ b/mozilla/webtools/tinderbox/showbuilds.cgi @@ -25,17 +25,25 @@ require 'imagelog.pl'; require 'header.pl'; $|=1; +#require 'utils.pl'; +#$default_root = pickDefaultRepository(); +# Terrible hack until I can figure out how to do this properly. -slamm +$default_root = '/cvsroot'; # # show 12 hours by default # +$nowdate = time; +if (not defined($maxdate = $form{maxdate})) { + $maxdate = $nowdate; +} if($form{'showall'} != 0 ){ $mindate = 0; } else { $hours = 12; $hours = $form{hours} if $form{hours} ne ""; - $mindate = time - ($hours*60*60); + $mindate = $maxdate - ($hours*60*60); } $colormap = { @@ -168,7 +176,8 @@ $treename = $tree . ($tree2 ne "" ? " and $tree2" : "" ); "tree: $treename ($now)"); print "$script_str\n"; - print "$message_of_day\n"; + # Only show the message of the day on the first pageful + print "$message_of_day\n" if $maxdate eq $nowdate; if (!$form{'nocrap'}) { my ($imageurl,$imagewidth,$imageheight,$quote) = &get_image; @@ -198,7 +207,7 @@ $treename = $tree . ($tree2 ne "" ? " and $tree2" : "" ); }; } if($bonsai_tree){ - print "
The tree is currently ";
+ print "The tree is currently ";
if( &tree_open ){
print "OPEN";
}
@@ -231,14 +240,8 @@ sub display_build_table_row {
my ($tt, $hour_color);
$tt = &print_time($build_time_times->[$t]);
- if( $tree2 ne ""){
- $qr = "";
- $er = "";
- }
- else {
- $qr = &query_ref( $td1, $build_time_times->[$t]);
- $er = "";
- }
+ my ($qr) = '';
+ my ($er) = '';
if ($build_time_times->[$t] % 7200 > 3600) {
$hour_color = "";
@@ -250,6 +253,10 @@ sub display_build_table_row {
if ($lasthour == $hour) {
$tt =~ s/^.* //;
} else {
+ if ($tree2 eq '') {
+ $qr = &query_ref( $td1, $build_time_times->[$t]);
+ $er = "";
+ }
$lasthour = $hour;
}
@@ -424,8 +431,9 @@ sub display_build_table_header {
sub display_build_table_footer {
print "\n";
-# print "";
- print "Show more checkin history
\n";
+ my $nextdate = $maxdate - $hours*60*60;
+ print "";
+ print "Show next $hours hours
\n";
if (open(FOOTER, "<$data_dir/footer.html")) {
while (