#!/usr/bonsaitools/bin/perl -- # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Netscape Public License # Version 1.0 (the "License"); you may not use this file except in # compliance with the License. You may obtain a copy of the License at # http://www.mozilla.org/NPL/ # # Software distributed under the License is distributed on an "AS IS" # basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the # License for the specific language governing rights and limitations # under the License. # # The Original Code is the Tinderbox build tool. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are Copyright (C) 1998 # Netscape Communications Corporation. All Rights Reserved. use lib "../bonsai"; use Fcntl; require "tbglobals.pl"; require 'lloydcgi.pl'; if (defined($args = $form{log})) { ($tree, $logfile) = split /\//, $args; my $br = find_build_record($tree, $logfile); $errorparser = $br->{errorparser}; $buildname = $br->{buildname}; $buildtime = $br->{buildtime}; } else { $tree = $form{'tree'}; $logfile = $form{'logfile'}; $errorparser = $form{'errorparser'}; $buildname = $form{'buildname'}; $buildtime = $form{'buildtime'}; } $enc_buildname = &url_encode($buildname); $note = $form{'note'}; $who = $form{'who'}; $now = time; $now_str = &print_time($now); $|=1; if( -r "$tree/ignorebuilds.pl" ){ require "$tree/ignorebuilds.pl"; } print "Content-Type:text/html\n"; if ($ENV{"REQUEST_METHOD"} eq 'POST' && defined($form{'note'})) { # Expire the cookie 5 months from now print "Set-Cookie: email=$form{who}; expires=" . toGMTString(time + 86400 * 152) . "; path=/\n"; } print "\n\n"; if( $url = $form{"note"} ){ $note =~ s/\&/&/gi; $note =~ s/\</gi; $note =~ s/\>/>/gi; $enc_note = url_encode( $note ); open( NOTES,">>$tree/notes.txt"); flock(NOTES, LOCK_EX); print NOTES "$buildtime|$buildname|$who|$now|$enc_note\n"; &LoadBuildTable; foreach $element (keys %form) { if(exists ${$build_name_index}{$element}) { print NOTES "${$build_name_index}{$element}|$element|$who|$now|$enc_note\n"; } #EndIf } #Endforeach close(NOTES); print "
\n[$who - $now_str]\n$note\n"; print"
Go back to the Error Log
Go back to the build Page";
# Build tinderbox static pages
$ENV{QUERY_STRING}="tree=$tree&static=1";
$ENV{REQUEST_METHOD}="GET";
system './showbuilds.cgi >/dev/null';
} else {
&GetBuildNameIndex;
@names = sort (keys %$build_name_index);
if ($buildname eq '' || $buildtime == 0) {
print "
Add a Log Comment |
$buildname
|