summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjoe <joe@FreeBSD.org>2001-05-20 10:33:49 +0000
committerjoe <joe@FreeBSD.org>2001-05-20 10:33:49 +0000
commit22e3d98349dd9915af41193f1005e20c673fc142 (patch)
tree60c11ff559c662b7e20658030280cf38d6e88bd6
parent2e200bfc547d77db4b7b90fd22fd8a302c7eab08 (diff)
downloadFreeBSD-ports-22e3d98349dd9915af41193f1005e20c673fc142.zip
FreeBSD-ports-22e3d98349dd9915af41193f1005e20c673fc142.tar.gz
Use the cfg.pm configuration file instead of hardcoding the template header
typecheck definitions in-line.
-rwxr-xr-xCVSROOT/logcheck25
1 files changed, 3 insertions, 22 deletions
diff --git a/CVSROOT/logcheck b/CVSROOT/logcheck
index 18f7fa1..66fcb15 100755
--- a/CVSROOT/logcheck
+++ b/CVSROOT/logcheck
@@ -12,27 +12,8 @@
#
use strict;
-
-
-############################################################
-#
-# Configurable options
-#
-############################################################
-
-# These are the optional headers that can be filled at the end of
-# each commit message. The associated value is a regular-expression
-# that is used to type-check the entered value. If the match failed
-# then the commit is rejected. (See rcstemplate).
-my %HEADERS = (
- "Reviewed by" => '.*',
- "Submitted by" => '.*',
- "Obtained from" => '.*',
- "Approved by" => '.*',
- "PR" => '.*',
- "MFC after" => '\d+(?:\s+(?:days?|weeks?|months?))?'
-);
-
+use lib $ENV{CVSROOT};
+use CVSROOT::cfg;
#############################################################
@@ -95,7 +76,7 @@ while ($j >= 0) {
my $header = $1;
my $value = $2;
- my $pattern = $HEADERS{$header};
+ my $pattern = $cfg::TEMPLATE_HEADERS{$header};
# Ignore unrecognised headers.
unless (defined($pattern)) {
OpenPOWER on IntegriCloud