diff --git a/mozilla/webtools/tinderbox/README b/mozilla/webtools/tinderbox/README
index 327f5e0788c..3051eaa06d5 100644
--- a/mozilla/webtools/tinderbox/README
+++ b/mozilla/webtools/tinderbox/README
@@ -194,7 +194,9 @@ rows separated by "\n" and columns by '|'.
$tree/${logfile}
$tree/${logfile}.brief.html
$tree/ignorebuilds.pl
-$tree/mod.pl
+$tree/rules.pl
+$tree/status.pl
+$tree/sheriff.pl
$tree/notes.txt
$tree/treedata.pl
$tree/who.dat
@@ -212,9 +214,17 @@ ignorebuilds.pl is a file which specifies builds that should not be
performed. It is valid perl code which sets the hash reference
$ignore_builds, each key is a tree name.
-mod.pl stores the tree specific message of the day. This is not to be
- confused with mod perl the CGI library. Its contents looks like:
- $message_of_day = 'message';
+status.pl stores the tree-specific status. Its contents looks like:
+ $status_message = 'message';
+ 1;
+
+rules.pl stores the tree rules message. Its contents looks like:
+ $rules_message = 'message';
+ 1;
+
+sheriff.pl stores the current sheriff. Its contents looks like:
+ $current_sheriff = 'sheriff';
+ 1;
notes.txt store the database of notes:
$buildtime|$buildname||$author|$time_now|$note
diff --git a/mozilla/webtools/tinderbox/admintree.cgi b/mozilla/webtools/tinderbox/admintree.cgi
index 199f3d4dd4c..6ea91bddfdc 100755
--- a/mozilla/webtools/tinderbox/admintree.cgi
+++ b/mozilla/webtools/tinderbox/admintree.cgi
@@ -38,77 +38,147 @@ tb_load_data();
EmitHtmlHeader("administer tinderbox", "tree: $tree");
-
if (defined($tree)) {
- if( -r "$tree/mod.pl" ){
- require "$tree/mod.pl";
- $message_of_day =~ s/\s*$//; # Trim trailing whitespace;
- }
- else {
- $message_of_day = "";
+
+ # Sheriff
+ if( -r "$tree/sheriff.pl" ){
+ require "$tree/sheriff.pl";
+ $current_sheriff =~ s/\s*$//; # Trim trailing whitespace;
+ } else {
+ $current_sheriff = "";
}
+ # Status message.
+ if( -r "$tree/status.pl" ){
+ require "$tree/status.pl";
+ $status_message =~ s/\s*$//; # Trim trailing whitespace;
+ } else {
+ $status_message = "";
+ }
+
+ # Tree rules.
+ if( -r "$tree/rules.pl" ){
+ require "$tree/rules.pl";
+ $rules_message =~ s/\s*$//; # Trim trailing whitespace;
+ } else {
+ $rules_message = "";
+ }
+
+
+#
+# Change sheriff
+#
print "
";
+#
+# Status message
+#
print "
+
+
+Status message. (Use this for stay-out-of-the-tree warnings, etc.)
+$status_message
+
+
+
Password:
+
+
+
+
+";
+
+#
+# Rules message.
+#
+
+ print "
+
+
+
+The tree rules.
+$rules_message
+
+
+Password:
+
+
+
+";
+
+#
+# Trim logs.
+#
+
+ print "
+
-Trim Logs to days. (Tinderbox
-shows 2 days history by default. You can see more by clicking show all).
-
+Trim Logs
+Trim Logs to days. (Tinderbox
+shows 2 days history by default. You can see more by clicking show all).
+Password:
+
-
" ;
}
+#
+# Create a new tinderbox page.
+#
+
print "
-Password:
+Create a new tinderbox page.
+Password:
-
";
+#
+# Turn builds off.
+#
+
if (defined($tree)) {
print "
If builds are behaving badly you can turn them off. Uncheck
the build that is misbehaving and click the button. You can still see all the
builds even if some are disabled by adding the parameter &noignore=1 to
the tinderbox URL.
-Password:
+
";
@@ -124,13 +194,10 @@ the tinderbox URL.
}
print "
+Password:
";
}
-
-
-
-
diff --git a/mozilla/webtools/tinderbox/copydata b/mozilla/webtools/tinderbox/copydata
index 74bb709bf52..9931a7d3653 100755
--- a/mozilla/webtools/tinderbox/copydata
+++ b/mozilla/webtools/tinderbox/copydata
@@ -72,7 +72,7 @@ do
cd $tinderbox_dir/$tree
- for file in build.dat mod.pl notes.txt treedata.pl who.dat ignorebuilds.pl bloat.dat warn.pl
+ for file in build.dat status.pl rules.pl sheriff.pl notes.txt treedata.pl who.dat ignorebuilds.pl bloat.dat warn.pl
do
rm -f $file
wget $tinderbox_link/$tree/$file
diff --git a/mozilla/webtools/tinderbox/doadmin.cgi b/mozilla/webtools/tinderbox/doadmin.cgi
index 60eddffab1c..40c40a033ed 100755
--- a/mozilla/webtools/tinderbox/doadmin.cgi
+++ b/mozilla/webtools/tinderbox/doadmin.cgi
@@ -46,8 +46,14 @@ elsif( $command eq 'remove_build' ){
elsif( $command eq 'trim_logs' ){
&trim_logs;
}
-elsif( $command eq 'set_message' ){
- &set_message;
+elsif( $command eq 'set_status_message' ){
+ &set_status_message;
+}
+elsif( $command eq 'set_rules_message' ){
+ &set_rules_message;
+}
+elsif( $command eq 'set_sheriff' ){
+ &set_sheriff;
}
elsif( $command eq 'disable_builds' ){
&disable_builds;
@@ -206,15 +212,36 @@ sub disable_builds {
print "\n";
}
-
-sub set_message {
- $m = $form{'message'};
+sub set_sheriff {
+ $m = $form{'sheriff'};
$m =~ s/\'/\\\'/g;
- open(MOD, ">$tree/mod.pl");
- print MOD "\$message_of_day = \'$m\'\;\n1;";
- close(MOD);
- chmod( 0777, "$tree/mod.pl");
+ open(SHERIFF, ">$tree/sheriff.pl");
+ print SHERIFF "\$current_sheriff = '$m';\n1;";
+ close(SHERIFF);
+ chmod( 0777, "$tree/sheriff.pl");
print "\n";
+ Sheriff Changed. \n";
+}
+
+sub set_status_message {
+ $m = $form{'status'};
+ $m =~ s/\'/\\\'/g;
+ open(TREESTATUS, ">$tree/status.pl");
+ print TREESTATUS "\$status_message = \'$m\'\;\n1;";
+ close(TREESTATUS);
+ chmod( 0777, "$tree/status.pl");
+ print "\n";
+}
+
+sub set_rules_message {
+ $m = $form{'rules'};
+ $m =~ s/\'/\\\'/g;
+ open(RULES, ">$tree/rules.pl");
+ print RULES "\$rules_message = \'$m\';\n1;";
+ close(RULES);
+ chmod( 0777, "$tree/rules.pl");
+ print "\n";
}
diff --git a/mozilla/webtools/tinderbox/showbuilds.cgi b/mozilla/webtools/tinderbox/showbuilds.cgi
index dc1a435428c..c24483f3e4e 100755
--- a/mozilla/webtools/tinderbox/showbuilds.cgi
+++ b/mozilla/webtools/tinderbox/showbuilds.cgi
@@ -169,9 +169,17 @@ sub print_page_head {
&print_javascript;
- # Get the message of the day only on the first pageful
- do "$::tree/mod.pl" if $nowdate eq $maxdate;
- print "$message_of_day\n"; # from $::tree/mod.pl
+ # Print rules, sheriff, and status. Only on the first pageful.
+ if ($nowdate eq $maxdate) {
+ do "$::tree/rules.pl";
+ print "$rules_message "; # from $::tree/rules.pl
+
+ do "$::tree/sheriff.pl";
+ print "$current_sheriff "; # from $::tree/sheriff.pl
+
+ do "$::tree/status.pl";
+ print "$status_message "; # from $::tree/status.pl
+ }
# Quote and Lengend
#