From 721e2155b04711a3e7f4eaf39102ecd4978c67b9 Mon Sep 17 00:00:00 2001 From: joe Date: Fri, 30 Nov 2001 14:26:57 +0000 Subject: Move the map that determines the names of the log files to use into the configuration file. --- CVSROOT/cfg.pm | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) (limited to 'CVSROOT/cfg.pm') diff --git a/CVSROOT/cfg.pm b/CVSROOT/cfg.pm index 0979f8d01e98..734827e40fba 100755 --- a/CVSROOT/cfg.pm +++ b/CVSROOT/cfg.pm @@ -16,9 +16,10 @@ use strict; use vars qw( $ADD_TO_LINE $AVAIL_FILE $CHECK_HEADERS $COMMITCHECK_EXTRA @COMMIT_HOSTS $COMMITTER $DEBUG $EXCLUDE_FILE $FILE_PREFIX $IDHEADER - $LAST_FILE $MAILADDRS $MAILBANNER $MAILCMD $MAIL_BRANCH_HDR - $MAIL_ON_DIR_CREATION $MAIL_TRANSFORM $MINCVSVERSION $PID $PROG_CVS - $PROG_MV %TEMPLATE_HEADERS $TMPDIR $UNEXPAND_RCSID $WARN_HEADERS + $LAST_FILE @LOG_FILE_MAP $MAILADDRS $MAILBANNER $MAILCMD + $MAIL_BRANCH_HDR $MAIL_ON_DIR_CREATION $MAIL_TRANSFORM $MINCVSVERSION + $PID $PROG_CVS $PROG_MV %TEMPLATE_HEADERS $TMPDIR $UNEXPAND_RCSID + $WARN_HEADERS ); my $CVSROOT = $ENV{'CVSROOT'} || die "Can't determine \$CVSROOT!"; @@ -187,6 +188,28 @@ $MAIL_TRANSFORM = ""; # add_cvsweb_entry("http://www.example.org/cgi-bin/cvsweb.cgi", @_); #}; +# A copy of the commit summary is saved locally as well as being +# emailed to the committers. The name of the local log is obtained +# by performing a pattern match on the directory that the files are +# in. The following map defines the file names and their associated +# pattern match. They are checked in order. The name 'other' is +# used if none of the patterns match. +# +# XXX The directory that the logs are placed in should be a +# configuration option too. +@LOG_FILE_MAP = ( + 'CVSROOT' => '^CVSROOT/', + 'doc' => '^doc/', + 'user' => '^src/', + 'other' => '.*' +); + + + + +###################### +# EXAMPLES +###################### # A function for post-processing a log message # and outputing it with URLs to a cvsweb.cgi in. sub add_cvsweb_entry { -- cgit