summaryrefslogtreecommitdiffstats
path: root/CVSROOT/cfg.pm
diff options
context:
space:
mode:
authorjoe <joe@FreeBSD.org>2001-11-15 12:39:43 +0000
committerjoe <joe@FreeBSD.org>2001-11-15 12:39:43 +0000
commit345b5ec7d8cc9a721b989f863d878c19b562dc0c (patch)
tree92784679f122990cb29a83bd32b978873a8da520 /CVSROOT/cfg.pm
parent7152f4460e9b5f4aad481c51f2aca5b5a8a2e7f9 (diff)
downloadFreeBSD-ports-345b5ec7d8cc9a721b989f863d878c19b562dc0c.zip
FreeBSD-ports-345b5ec7d8cc9a721b989f863d878c19b562dc0c.tar.gz
Migrate the code that determines what the name of the committer is
to the configuration file creating a new config variable $COMMITTER.
Diffstat (limited to 'CVSROOT/cfg.pm')
-rwxr-xr-xCVSROOT/cfg.pm14
1 files changed, 9 insertions, 5 deletions
diff --git a/CVSROOT/cfg.pm b/CVSROOT/cfg.pm
index eabc2bc..b445d54 100755
--- a/CVSROOT/cfg.pm
+++ b/CVSROOT/cfg.pm
@@ -14,11 +14,11 @@
package cfg;
use strict;
use vars qw(
- $ADD_TO_LINE $CHECK_HEADERS $COMMITCHECK_EXTRA $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 $TMPDIR $UNEXPAND_RCSID %TEMPLATE_HEADERS
- @COMMIT_HOSTS
+ $ADD_TO_LINE $CHECK_HEADERS $COMMITCHECK_EXTRA $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 $TMPDIR $UNEXPAND_RCSID
+ %TEMPLATE_HEADERS @COMMIT_HOSTS
);
my $CVSROOT = $ENV{'CVSROOT'} || die "Can't determine \$CVSROOT!";
@@ -50,6 +50,10 @@ $LAST_FILE = "$TMPDIR/$FILE_PREFIX.lastdir";
$PROG_CVS = '/usr/bin/cvs'; # cvs(1)
$PROG_MV = '/bin/mv'; # mv(1)
+# The username of the committer.
+$COMMITTER = $ENV{"LOGNAME"} || $ENV{'USER'} || getlogin
+ || (getpwuid($<))[0] || sprintf("uid#%d",$<);
+
###################
### commitcheck ###
OpenPOWER on IntegriCloud