diff options
author | joe <joe@FreeBSD.org> | 2001-11-15 20:35:33 +0800 |
---|---|---|
committer | joe <joe@FreeBSD.org> | 2001-11-15 20:35:33 +0800 |
commit | 58e7d63643c07c23319ebe79c89e9652f890a6a5 (patch) | |
tree | 16765977a13ecb91d01d9a09649b968f32be6446 /CVSROOT/commitcheck | |
parent | 3795775ad7428efb3a05f3b3f8d6d13ed26e9034 (diff) | |
download | freebsd-ports-gnome-58e7d63643c07c23319ebe79c89e9652f890a6a5.tar.gz freebsd-ports-gnome-58e7d63643c07c23319ebe79c89e9652f890a6a5.tar.zst freebsd-ports-gnome-58e7d63643c07c23319ebe79c89e9652f890a6a5.zip |
Add a new configuration option: COMMITCHECK_EXTRA. This is a
reference to an anonymous subroutine that if defined gets run at
commitcheck time. It allows the admin to run further checks to
see whether committing is allowed.
Diffstat (limited to 'CVSROOT/commitcheck')
-rwxr-xr-x | CVSROOT/commitcheck | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/CVSROOT/commitcheck b/CVSROOT/commitcheck index aa58ef37d0a6..65e0bc929468 100755 --- a/CVSROOT/commitcheck +++ b/CVSROOT/commitcheck @@ -26,6 +26,7 @@ if (@cfg::COMMIT_HOSTS && !grep(/^\Q$hostname\E$/i, @cfg::COMMIT_HOSTS)) { exit 1; } + # Sanity check to make sure we've been run through the wrapper and are # now primary group 'ncvs'. # @@ -36,6 +37,16 @@ unless ( $GRP =~ /^ncvs$/ ) { exit 1; } + +# Run locally defined extra commitchecks. +if (defined($cfg::COMMITCHECK_EXTRA) && $cfg::COMMITCHECK_EXTRA) { + die 'commitcheck: $cfg::COMMITCHECK_EXTRA isn\'t a sub!' + unless ref($cfg::COMMITCHECK_EXTRA) eq "CODE"; + + die "Failed commitcheck_extra\n" unless &$cfg::COMMITCHECK_EXTRA(); +} + + # # Ensure the minimum version of cvs is installed. # |