summaryrefslogtreecommitdiffstats
path: root/CVSROOT
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-09-10 19:57:54 +0000
committerpeter <peter@FreeBSD.org>1999-09-10 19:57:54 +0000
commit29ce0dc6fe290cb01d42ba9164aa3e1042786ad2 (patch)
tree24ebd3ab3bcf37f2cfce2260b97450f10c78e719 /CVSROOT
parentb9328e25f539e8318618ee6e97206daa23251e70 (diff)
downloadFreeBSD-ports-29ce0dc6fe290cb01d42ba9164aa3e1042786ad2.zip
FreeBSD-ports-29ce0dc6fe290cb01d42ba9164aa3e1042786ad2.tar.gz
Add some debugging and activate this for "peter" so I can check it out
in situ.
Diffstat (limited to 'CVSROOT')
-rwxr-xr-xCVSROOT/commit_prep.pl21
1 files changed, 14 insertions, 7 deletions
diff --git a/CVSROOT/commit_prep.pl b/CVSROOT/commit_prep.pl
index 2161b63..6263de9 100755
--- a/CVSROOT/commit_prep.pl
+++ b/CVSROOT/commit_prep.pl
@@ -56,8 +56,8 @@ $NoName = "
%s - The ID line should contain only \"\$\FreeBSD\$\" for a newly created file.\n";
$BadName = "
-%s - The file name '%s' in the ID line does not match
- the actual filename.\n";
+%s - The pathname '%s'
+ in the \$\FreeBSD\$ line does not match the actual filename.\n";
$BadVersion = "
%s - How dare you!! You replaced your copy of the file '%s',
@@ -84,7 +84,7 @@ sub check_version {
local($filename, $directory, $hastag, $cvsversion) = @_;
open(FILE, $filename) || die("Cannot open $filename, stopped");
- for ($i = 1; $i < 30; $i++) {
+ for ($i = 1; $i < 50; $i++) {
$pos = -1;
last if eof(FILE);
$line = <FILE>;
@@ -111,10 +111,12 @@ sub check_version {
return(0);
}
-# if ($rname ne "$directory/$filename,v") {
-# printf($BadName, $filename, substr($rname, 0, length($rname)-2));
-# return(1);
-# }
+print "rname:$rname, dir/file:$directory/$filename,v.\n";
+
+ if ($rname ne "$directory/$filename,v" && $rname ne "$filename,v") {
+ printf($BadName, "$directory/$filename,v", $rname);
+ return(1);
+ }
if ($cvsversion{$filename} < $version) {
printf($BadVersion, $filename, $filename, $cvsversion{$filename},
"newer", $version, $filename);
@@ -134,6 +136,7 @@ sub check_version {
#
############################################################
+$login = $ENV{'USER'} || getlogin || (getpwuid($<))[0] || sprintf("uid#%d",$<);
$id = getpgrp();
#print("ARGV - ", join(":", @ARGV), "\n");
#print("id - ", id, "\n");
@@ -167,7 +170,11 @@ if ($directory =~ /src\/contrib\//) {
if ($directory =~ /src\/crypto\//) {
$check_id = 3;
}
+if ($login eq "peter") {
+ print "directory:$directory, check_id:$check_id\n";
+} else {
$check_id = 0;
+}
if ($check_id != 0 && $ENV{'CVSFUBAR'}) {
$check_id = 0;
print "CVS VERSION CHECK BYPASSED!\n";
OpenPOWER on IntegriCloud