# ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1 # # The contents of this file are subject to the Mozilla Public License Version # 1.1 (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/MPL/ # # 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 Try server submission form. # # The Initial Developer of the Original Code is # Mozilla Corporation. # Portions created by the Initial Developer are Copyright (C) 2007 # the Initial Developer. All Rights Reserved. # # Contributor(s): # Ben Hearsum # Johnathan Nightingale # ***** END LICENSE BLOCK ***** # Description: # This file is require'd by sendchange.cgi. It provides the UI for the cgi # form. use strict; use warnings; # set this to true if the try server is down for maintenance my $MAINTENANCE_MODE = 0; # essentially, the size limit for the file. (in reality, the size limit for # the POST as a whole) # 10*1024*1024 is 10MB my $SIZE_LIMIT = 10*1024*1024; # the URL to the buildbot insntallation the patches will eventually go to my $BUILDBOT_URL = 'http://tinderbox.mozilla.org/showbuilds.cgi?tree=MozillaTry'; # the URL to the sendchange.cgi script my $SENDCHANGE_URL = 'https://build.mozilla.org/sendchange.cgi'; # the default path to the mozilla-central hg repository my $MOZILLA_REPO_PATH = 'http://hg.mozilla.org/mozilla-central'; # the URL to the try server documentation my $DOCUMENTATION_URL = 'http://wiki.mozilla.org/Build:TryServer'; sub WriteSuccessPage { print "Content-type: text/html\n\n"; print <<__END_OF_HTML__; Patch uploaded successfully

Patch Uploaded Successfully

Look for your patch here
__END_OF_HTML__ } sub WritePage { my %args = @_; my $patchLevel = "1"; my $branch = ""; my $identifier = ""; my $description = ""; my $type = "patch"; my $mozillaRepoPath = $MOZILLA_REPO_PATH; my @err; if (exists $args{'patchLevel'} && $args{'patchLevel'} !~ /^\s*$/) { $patchLevel = $args{'patchLevel'}; } if (exists $args{'branch'} && $args{'branch'} !~ /^\s*$/) { $branch = $args{'branch'}; } if (exists $args{'identifier'} && $args{'identifier'} !~ /^\s*$/) { $identifier = $args{'identifier'}; } if (exists $args{'description'} && $args{'description'} !~ /^\s*$/) { $description = $args{'description'}; } if (exists $args{'type'} && $args{'type'} !~ /^\s*$/) { $type = $args{'type'}; } if (exists $args{'mozillaRepoPath'} && $args{'mozillaRepoPath'} !~ /^\s*$/) { $mozillaRepoPath = $args{'mozillaRepoPath'}; } if (exists $args{'err'}) { @err = @{$args{'err'}}; } my $limit = $SIZE_LIMIT / 1024; print "Content-type: text/html\n\n"; print <<__END_OF_HTML__; MozillaTry Buildbot Test Page
Source:
\n"; print <<__END_OF_HTML__;
?:

__END_OF_HTML__ foreach my $e (@err) { print "$e
\n"; } print <<__END_OF_HTML__;

__END_OF_HTML__ } 1;