Mozilla/CVSROOT/commitcheck.pl
despotdaemon%netscape.com ffe45c60a3 Pseudo-automatic update of changes made by leaf@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@53227 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-11 20:37:09 +00:00

445 lines
14 KiB
Perl
Executable File

#!/tools/ns/bin/perl5.004 --
# DO NOT EDIT THIS FILE! You must instead go to http://cvs-mirror.mozilla.org/webtools/despot, and
# tweak things from there.
$mode{'95'} = 'Open';
$branch{'95'} = 'HEAD';
$fullname{'95'} = '2-D Graphics';
$mode{'52'} = 'Open';
$branch{'52'} = 'HEAD';
$fullname{'52'} = 'Aurora/RDF BE';
$mode{'53'} = 'Open';
$branch{'53'} = 'HEAD';
$fullname{'53'} = 'Berkeley DB';
$mode{'55'} = 'Open';
$branch{'55'} = 'HEAD';
$fullname{'55'} = 'Build Config';
$mode{'108'} = 'Open';
$branch{'108'} = 'HEAD';
$fullname{'108'} = 'CCK';
$mode{'96'} = 'Open';
$branch{'96'} = 'HEAD';
$fullname{'96'} = 'Clipping and Compositing';
$mode{'15'} = 'Restricted';
$branch{'15'} = 'ColorSync_19980824_BRANCH';
$fullname{'15'} = 'ColorSync Branch';
$blessed{'15'} = [];
$super{'15'} = ['ebb3%apple.com','pinkerton%netscape.com','pnunn%netscape.com','saari%netscape.com',];
$mode{'56'} = 'Open';
$branch{'56'} = 'HEAD';
$fullname{'56'} = 'Composer';
$mode{'4'} = 'Open';
$branch{'4'} = 'HEAD';
$fullname{'4'} = 'default';
$defaultid = '4';
$mode{'3'} = 'Closed';
$branch{'3'} = 'HEAD';
$fullname{'3'} = 'despotaccess';
$blessed{'3'} = [];
$super{'3'} = ['despotdaemon%netscape.com',];
$mode{'58'} = 'Open';
$branch{'58'} = 'HEAD';
$fullname{'58'} = 'Dialup';
$mode{'59'} = 'Open';
$branch{'59'} = 'HEAD';
$fullname{'59'} = 'Directory SDK';
$mode{'103'} = 'Open';
$branch{'103'} = 'HEAD';
$fullname{'103'} = 'Document Object Model';
$mode{'46'} = 'Open';
$branch{'46'} = 'HEAD';
$fullname{'46'} = 'ef';
$mode{'101'} = 'Open';
$branch{'101'} = 'HEAD';
$fullname{'101'} = 'Embeddable Web Browser';
$mode{'49'} = 'Open';
$branch{'49'} = 'HEAD';
$fullname{'49'} = 'GTK';
$mode{'62'} = 'Open';
$branch{'62'} = 'HEAD';
$fullname{'62'} = 'HTML to Text/PostScript Translation';
$mode{'67'} = 'Open';
$branch{'67'} = 'HEAD';
$fullname{'67'} = 'I18N Library';
$mode{'66'} = 'Open';
$branch{'66'} = 'HEAD';
$fullname{'66'} = 'Image Conversion Library';
$mode{'63'} = 'Open';
$branch{'63'} = 'HEAD';
$fullname{'63'} = 'ImageLib';
$mode{'69'} = 'Open';
$branch{'69'} = 'HEAD';
$fullname{'69'} = 'Java and JS Capability-Based Security';
$mode{'130'} = 'Open';
$branch{'130'} = 'HEAD';
$fullname{'130'} = 'Java APIs for DOM';
$mode{'127'} = 'Open';
$branch{'127'} = 'HEAD';
$fullname{'127'} = 'Java APIs to WebShell';
$mode{'131'} = 'Open';
$branch{'131'} = 'HEAD';
$fullname{'131'} = 'Java Front End';
$mode{'68'} = 'Open';
$branch{'68'} = 'HEAD';
$fullname{'68'} = 'Java Stubs';
$mode{'128'} = 'Open';
$branch{'128'} = 'HEAD';
$fullname{'128'} = 'Java to XPCOM Bridge';
$mode{'133'} = 'Open';
$branch{'133'} = 'HEAD';
$fullname{'133'} = 'Java Utility Classes';
$mode{'129'} = 'Open';
$branch{'129'} = 'HEAD';
$fullname{'129'} = 'Java-Implemented Plugins';
$mode{'70'} = 'Open';
$branch{'70'} = 'HEAD';
$fullname{'70'} = 'JavaScript';
$mode{'71'} = 'Open';
$branch{'71'} = 'HEAD';
$fullname{'71'} = 'JavaScript Debugger';
$mode{'12'} = 'Open';
$branch{'12'} = 'HEAD';
$fullname{'12'} = 'jpeg';
$mode{'64'} = 'Open';
$branch{'64'} = 'HEAD';
$fullname{'64'} = 'JPEG Image Handling';
$mode{'114'} = 'Open';
$branch{'114'} = 'HEAD';
$fullname{'114'} = 'js-tests';
$mode{'72'} = 'Open';
$branch{'72'} = 'HEAD';
$fullname{'72'} = 'LiveConnect';
$mode{'136'} = 'Closed';
$branch{'136'} = 'HEAD';
$fullname{'136'} = 'Locked-Content';
$blessed{'136'} = [];
$super{'136'} = ['hyatt%netscape.com',];
$mode{'47'} = 'Open';
$branch{'47'} = 'HEAD';
$fullname{'47'} = 'Macintosh FE';
$mode{'123'} = 'Open';
$branch{'123'} = 'HEAD';
$fullname{'123'} = 'Mail/News';
$mode{'124'} = 'Open';
$branch{'124'} = 'HEAD';
$fullname{'124'} = 'MIME';
$mode{'112'} = 'Restricted';
$branch{'112'} = 'HEAD';
$fullname{'112'} = 'Mozilla Tools';
$blessed{'112'} = ['warren%netscape.com','toshok%hungry.com','tague%netscape.com','slamm%netscape.com','scc%netscape.com','ramiro%fateware.com','phillip%netscape.com','petitta%netscape.com','mcafee%netscape.com','kipp%netscape.com','jj%netscape.com','friedman%splode.com','endico%mozilla.org','donm%bluemartini.com','dmose%mozilla.org','cls%seawood.org','bsharma%netscape.com','briano%netscape.com','braddr%puremagic.com','amasri%netscape.com','Jerry.Kirk%Nexwarecorp.com',];
$super{'112'} = ['leaf%mozilla.org','cyeh%netscape.com',];
$mode{'19'} = 'Open';
$branch{'19'} = 'HEAD';
$fullname{'19'} = 'mozilla-toplevel';
$mode{'77'} = 'Open';
$branch{'77'} = 'HEAD';
$fullname{'77'} = 'NetLib';
$mode{'99'} = 'Open';
$branch{'99'} = 'HEAD';
$fullname{'99'} = 'New HTML Layout Engine';
$mode{'102'} = 'Open';
$branch{'102'} = 'HEAD';
$fullname{'102'} = 'New HTML Parser';
$mode{'100'} = 'Open';
$branch{'100'} = 'HEAD';
$fullname{'100'} = 'New HTML Style System';
$mode{'98'} = 'Open';
$branch{'98'} = 'HEAD';
$fullname{'98'} = 'New Layout Engine';
$mode{'122'} = 'Open';
$branch{'122'} = 'HEAD';
$fullname{'122'} = 'News';
$mode{'78'} = 'Restricted';
$branch{'78'} = 'HEAD';
$fullname{'78'} = 'NSPR';
$blessed{'78'} = ['sdagley%netscape.com','gordon%netscape.com','cyeh%netscape.com','brendan%mozilla.org','cls%seawood.org',];
$super{'78'} = ['wtc%netscape.com','larryh%netscape.com','srinivas%netscape.com',];
$mode{'111'} = 'Open';
$branch{'111'} = 'HEAD';
$fullname{'111'} = 'PerlConnect';
$mode{'113'} = 'Open';
$branch{'113'} = 'HEAD';
$fullname{'113'} = 'Photon';
$mode{'80'} = 'Open';
$branch{'80'} = 'HEAD';
$fullname{'80'} = 'PICS';
$mode{'81'} = 'Open';
$branch{'81'} = 'HEAD';
$fullname{'81'} = 'Plugins';
$mode{'65'} = 'Open';
$branch{'65'} = 'HEAD';
$fullname{'65'} = 'PNG Image Handling';
$mode{'82'} = 'Open';
$branch{'82'} = 'HEAD';
$fullname{'82'} = 'Preferences';
$mode{'120'} = 'Open';
$branch{'120'} = 'HEAD';
$fullname{'120'} = 'Profile Manager';
$mode{'83'} = 'Open';
$branch{'83'} = 'HEAD';
$fullname{'83'} = 'Progress Window';
$mode{'84'} = 'Open';
$branch{'84'} = 'HEAD';
$fullname{'84'} = 'Registry';
$mode{'138'} = 'Open';
$branch{'138'} = 'HEAD';
$fullname{'138'} = 'Rhino';
$mode{'86'} = 'Open';
$branch{'86'} = 'HEAD';
$fullname{'86'} = 'Security Stubs';
$mode{'110'} = 'Open';
$branch{'110'} = 'HEAD';
$fullname{'110'} = 'Silent Download';
$mode{'115'} = 'Open';
$branch{'115'} = 'HEAD';
$fullname{'115'} = 'small-devices';
$mode{'87'} = 'Open';
$branch{'87'} = 'HEAD';
$fullname{'87'} = 'SmartUpdate';
$mode{'134'} = 'Open';
$branch{'134'} = 'HEAD';
$fullname{'134'} = 'Widgets';
$mode{'48'} = 'Open';
$branch{'48'} = 'HEAD';
$fullname{'48'} = 'Windows FE';
$mode{'121'} = 'Open';
$branch{'121'} = 'HEAD';
$fullname{'121'} = 'Xlib-based gfx + widget';
$mode{'88'} = 'Open';
$branch{'88'} = 'HEAD';
$fullname{'88'} = 'XML';
$mode{'90'} = 'Open';
$branch{'90'} = 'HEAD';
$fullname{'90'} = 'XP File Handling';
$mode{'91'} = 'Open';
$branch{'91'} = 'HEAD';
$fullname{'91'} = 'XP Miscellany';
$mode{'137'} = 'Open';
$branch{'137'} = 'HEAD';
$fullname{'137'} = 'XPApps';
$mode{'89'} = 'Open';
$branch{'89'} = 'HEAD';
$fullname{'89'} = 'XPCOM';
$mode{'118'} = 'Open';
$branch{'118'} = 'HEAD';
$fullname{'118'} = 'XPConnect';
$mode{'117'} = 'Open';
$branch{'117'} = 'HEAD';
$fullname{'117'} = 'XPIDL';
$mode{'106'} = 'Open';
$branch{'106'} = 'HEAD';
$fullname{'106'} = 'XPToolkit';
$mode{'140'} = 'Open';
$branch{'140'} = 'HEAD';
$fullname{'140'} = 'XSLT Processor';
$mode{'135'} = 'Open';
$branch{'135'} = 'HEAD';
$fullname{'135'} = 'xul.css';
$mode{'93'} = 'Open';
$branch{'93'} = 'HEAD';
$fullname{'93'} = 'Zlib';
sub GetT {
($b,$_) = (@_);
if ($b eq 'ColorSync_19980824_BRANCH') {
}
if ($b eq 'HEAD') {
if (m:^CVSROOT/commitcheck\.pl$:) {return '3';}
if (m:^CVSROOT/passwd$:) {return '3';}
if (m:^jpeg/.*$:) {return '12';}
if (m:^mozilla/[^/]*$:) {return '19';}
if (m:^mozilla/cmd/macfe/.*$:) {return '47';}
if (m:^mozilla/gfx/src/xlib/.*$:) {return '121';}
if (m:^mozilla/widget/src/xlib/.*$:) {return '121';}
if (m:^mozilla/ef/.*$:) {return '46';}
if (m:^mozilla/cmd/wincom/.*$:) {return '48';}
if (m:^mozilla/cmd/winfe/.*$:) {return '48';}
if (m:^mozilla/gfx/src/gtk/.*$:) {return '49';}
if (m:^mozilla/widget/src/gtk/.*$:) {return '49';}
if (m:^mozilla/rdf/.*$:) {return '52';}
if (m:^mozilla/dbm/.*$:) {return '53';}
if (m:^mozilla/build/.*$:) {return '55';}
if (m:^mozilla/config/.*$:) {return '55';}
if (m:^mozilla/l10n/.*$:) {return '55';}
if (m:^mozilla/editor$:) {return '56';}
if (m:^mozilla/cmd/dialup/.*$:) {return '58';}
if (m:^mozilla/directory/.*$:) {return '59';}
if (m:^mozilla/modules/libimg/.*$:) {return '63';}
if (m:^mozilla/modules/libutil/.*$:) {return '63';}
if (m:^mozilla/lib/libcnv/.*$:) {return '65';}
if (m:^mozilla/include/libcnv\.h/.*$:) {return '66';}
if (m:^mozilla/include/csid\.h/.*$:) {return '67';}
if (m:^mozilla/include/intl_csi\.h/.*$:) {return '67';}
if (m:^mozilla/include/libi18n\.h/.*$:) {return '67';}
if (m:^mozilla/include/resdef\.h/.*$:) {return '67';}
if (m:^mozilla/include/xpgetstr\.h/.*$:) {return '67';}
if (m:^mozilla/include/xplocale\.h/.*$:) {return '67';}
if (m:^mozilla/include/xpresdef\.h/.*$:) {return '67';}
if (m:^mozilla/include/xupfonts\.h/.*$:) {return '67';}
if (m:^mozilla/lib/libi18n/.*$:) {return '67';}
if (m:^mozilla/modules/oji/.*$:) {return '68';}
if (m:^mozilla/nav-java/.*$:) {return '68';}
if (m:^mozilla/sun-java/.*$:) {return '68';}
if (m:^mozilla/caps/.*$:) {return '69';}
if (m:^mozilla/js/ref/.*$:) {return '70';}
if (m:^mozilla/js/src/.*$:) {return '70';}
if (m:^mozilla/extensions/jsd/.*$:) {return '71';}
if (m:^mozilla/js/jsd/.*$:) {return '71';}
if (m:^mozilla/js/jsj/.*$:) {return '72';}
if (m:^mozilla/cck/.*$:) {return '108';}
if (m:^mozilla/network/.*$:) {return '77';}
if (m:^mozilla/nsprpub/.*$:) {return '78';}
if (m:^mozilla/lib/libpics/.*$:) {return '80';}
if (m:^mozilla/modules/plugin/.*$:) {return '81';}
if (m:^mozilla/modules/libpref/.*$:) {return '82';}
if (m:^mozilla/modules/progress/.*$:) {return '83';}
if (m:^mozilla/modules/libreg/.*$:) {return '84';}
if (m:^mozilla/modules/security/.*$:) {return '86';}
if (m:^mozilla/modules/softupdt/.*$:) {return '87';}
if (m:^mozilla/expat/.*$:) {return '88';}
if (m:^mozilla/xpcom/.*$:) {return '89';}
if (m:^mozilla/include/shist\.h/.*$:) {return '91';}
if (m:^mozilla/lib/libmisc/.*$:) {return '91';}
if (m:^mozilla/modules/zlib/.*$:) {return '93';}
if (m:^mozilla/view/.*$:) {return '96';}
if (m:^mozilla/layout/.*$:) {return '98';}
if (m:^mozilla/webshell/.*$:) {return '101';}
if (m:^mozilla/htmlparser/.*$:) {return '102';}
if (m:^mozilla/dom/.*$:) {return '103';}
if (m:^mozilla/js/rhino/.*$:) {return '138';}
if (m:^mozilla/xpfe$:) {return '137';}
if (m:^mozilla/js/tests$:) {return '114';}
if (m:^js/src/perlconnect$:) {return '111';}
if (m:^mozilla/silentdl/.*$:) {return '110';}
if (m:^mozilla/extensions/transformiix/.*$:) {return '140';}
if (m:^base/src/photon/.*$:) {return '113';}
if (m:^gfx/src/photon/.*$:) {return '113';}
if (m:^widget/src/photon/.*$:) {return '113';}
if (m:^mozilla/widget/public/.*$:) {return '134';}
if (m:^mozilla/profile$:) {return '120';}
if (m:^mozilla/tools/.*$:) {return '112';}
if (m:^xpcom/typelib$:) {return '117';}
if (m:^js/src/xpconnect$:) {return '118';}
if (m:^xpcom/reflect/xptcall$:) {return '118';}
if (m:^xpcom/reflect/xptinfo$:) {return '118';}
if (m:^mozilla/mailnews/news/.*$:) {return '122';}
if (m:^mozilla/mailnews/[^/]*$:) {return '123';}
if (m:^mozilla/java/xpcom/.*$:) {return '128';}
if (m:^mozilla/java/plugins/.*$:) {return '129';}
if (m:^mozilla/java/webclient/.*$:) {return '127';}
if (m:^mozilla/java/dom/.*$:) {return '130';}
if (m:^mozilla/java/fe/.*$:) {return '131';}
if (m:^mozilla/java/util/.*$:) {return '133';}
}
return '';
}
$debug = 0;
$origrepository = shift(@ARGV);
@files = @ARGV;
$envcvsroot = $ENV{'CVSROOT'};
open( REP, "<CVS/Repository");
$repository = <REP>;
chop($repository);
close(REP);
$repository =~ s:^$envcvsroot/::;
$doit = 0;
$| = 1;
if( $debug){
print STDERR "----------------------------------------------\n";
print STDERR "files: @files\n";
print STDERR "origrepository: $origrepository\n";
print STDERR " repository: $repository\n";
print STDERR "----------------------------------------------\n";
}
open(ENT, "<CVS/Entries" );
while( <ENT> ){
chop;
($d,$fn,$rev,$mod_time,$sticky,$tag) = split(/\//);
if ($tag =~ /^T(.*)$/) {
$fbranch{$fn} = $1;
}
}
close ENT;
foreach $f (@files) {
$b = "";
if (defined $fbranch{$f}) {$b = $fbranch{$f};}
if ($b eq "") {$b = "HEAD";}
$t = GetT($b, "$repository/$f");
if ($debug) {
print STDERR "GetT returned '$t' for '$repository/$f' branch '$b'\n";
}
if ($t eq "") {
$t = $defaultid;
}
if (!defined $mode{$t} || $mode{$t} eq "Open") {
next;
}
if ($debug) {
print STDERR "Checking twig $t\n";
}
# OK, we have a match. See if we're allowed to checkin here.
if ($username eq "") {
$username = $ENV{"CVS_USER"} || getlogin || (getpwuid($<))[0] || "nobody";
if ($debug) {
print STDERR "Username is $username\n";
print STDERR "getlogin returns " . getlogin . "\n";
print STDERR '(getpwuid($<))[0] returns ' . (getpwuid($<))[0] . "\n";
print STDERR "Environment:\n";
foreach $key (sort(keys %ENV)) {
print STDERR $key, '=', $ENV{$key}, "\n";
}
}
}
$ok = 0;
$s = $super{$t};
foreach $u (@$s) {
if ($debug) {
print STDERR "Checking against super $u\n";
}
if ($u eq $username) {
$ok = 1;
break;
}
}
if ($mode{$t} eq "Restricted") {
my $b = $blessed{$t};
foreach $u (@$b) {
if ($debug) {
print STDERR "Checking against blessed $u\n";
}
if ($u eq $username) {
$ok = 1;
break;
}
}
}
if (!$ok) {
print STDERR "You may not check into partition $fullname{$t}\n";
print STDERR "the file $repository/$f on branch $b\n";
print STDERR "If you think you should be allowed to, send mail to\n";
print STDERR "one of the below people:\n";
$s = $super{$t};
foreach $u (@$s) {
$u =~ s/%/@/;
print STDERR " $u\n";
}
exit 1;
}
}
exit 0;