mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
added error checking; moved vconfigurables to top of file; made cvs commit not spew noise to the webserver error log
This commit is contained in:
parent
40b5b61ac3
commit
549c5b38af
@ -18,11 +18,17 @@
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s): Terry Weissman <terry@mozilla.org>
|
||||
# Dan Mosedale <dmose@mozilla.org>
|
||||
|
||||
# $F::debug = 1;
|
||||
|
||||
|
||||
$cvs = "/opt/cvs-tools/bin/cvs";
|
||||
$whoami = "/usr/ucb/whoami";
|
||||
$perlbin = "/tools/ns/bin/perl5.004
|
||||
|
||||
#$cvs = "/usr/bin/cvs";
|
||||
#$whoami = "/usr/bin/whoami";
|
||||
#$perlbin = "/usr/bin/perl";
|
||||
|
||||
$dontcommit = 0;
|
||||
$usertoblame = "";
|
||||
@ -51,7 +57,7 @@ $db = Mysql->Connect("localhost", "mozusers")
|
||||
|
||||
$db = $db; # Make -w shut up.
|
||||
|
||||
($mylogin = `/usr/ucb/whoami`) || ($mylogin = `/bin/whoami`);
|
||||
($mylogin = `$whoami`);
|
||||
chop($mylogin);
|
||||
|
||||
$hostname = 'unknown';
|
||||
@ -117,7 +123,6 @@ while (@reprow = $repquery->fetchrow()) {
|
||||
push @filelist, "${g}_list";
|
||||
}
|
||||
}
|
||||
|
||||
system "$cvs co " . join(' ', grep(s@^@CVSROOT/@, @filelist))
|
||||
|| die "Couldn't checkout files.";
|
||||
|
||||
@ -162,7 +167,7 @@ while (@reprow = $repquery->fetchrow()) {
|
||||
$outfile = "CVSROOT/commitcheck.pl";
|
||||
open(COMMITCHECK, ">$outfile") || die "Can't open $outfile";
|
||||
|
||||
print COMMITCHECK "#!/tools/ns/bin/perl5.004 --\n";
|
||||
print COMMITCHECK "#!$perlbin --\n";
|
||||
print COMMITCHECK "# DO NOT EDIT THIS FILE! You must instead go to http://despot.mozilla.org/, and\n";
|
||||
print COMMITCHECK "# tweak things from there.\n\n";
|
||||
|
||||
@ -235,9 +240,11 @@ while (@reprow = $repquery->fetchrow()) {
|
||||
if ($dontcommit) {
|
||||
system "$cvs diff -c passwd";
|
||||
system "$cvs diff -c commitcheck.pl";
|
||||
# system "$cvs commit -m 'Pseudo-automatic update of changes made by $usertoblame.' commitcheck.pl";
|
||||
# system "$cvs -q commit -m 'Pseudo-automatic update of changes made by $usertoblame.' commitcheck.pl";
|
||||
} else {
|
||||
system "$cvs commit -m 'Pseudo-automatic update of changes made by $usertoblame.'";
|
||||
system ("$cvs -q commit -m 'Pseudo-automatic update of changes" .
|
||||
" made by $usertoblame.'") == 0
|
||||
or die "cvs commit failed";
|
||||
}
|
||||
|
||||
|
||||
@ -352,7 +359,9 @@ Documents:</TH><TD>";
|
||||
|
||||
close OWNERS;
|
||||
|
||||
system "$cvs commit -m 'Pseudo-automatic update of changes made by $usertoblame.'";
|
||||
system ( "$cvs -q commit -m 'Pseudo-automatic update of changes" .
|
||||
" made by $usertoblame.'" ) == 0
|
||||
or die "cvs commit failed";
|
||||
}
|
||||
|
||||
chdir "/";
|
||||
|
Loading…
Reference in New Issue
Block a user