diff options
author | joe <joe@FreeBSD.org> | 2001-01-16 06:18:50 +0800 |
---|---|---|
committer | joe <joe@FreeBSD.org> | 2001-01-16 06:18:50 +0800 |
commit | 756a2523550f232c2dd69ce8c0904f0979cc1554 (patch) | |
tree | cdd75e6299c9ec12677ff799fdf30eeea69b36f5 /CVSROOT | |
parent | 78a47b49ffc32c4940059679e5e52f187c320f4d (diff) | |
download | freebsd-ports-gnome-756a2523550f232c2dd69ce8c0904f0979cc1554.tar.gz freebsd-ports-gnome-756a2523550f232c2dd69ce8c0904f0979cc1554.tar.zst freebsd-ports-gnome-756a2523550f232c2dd69ce8c0904f0979cc1554.zip |
Simplify by making the optional banner at the top of the commit
mail a configuration variable at the top of the script. (The crypto
repository used this, but other projects may find it handy also.)
Diffstat (limited to 'CVSROOT')
-rwxr-xr-x | CVSROOT/log_accum.pl | 42 |
1 files changed, 17 insertions, 25 deletions
diff --git a/CVSROOT/log_accum.pl b/CVSROOT/log_accum.pl index bad22e21e3db..cef0d3f8e57b 100755 --- a/CVSROOT/log_accum.pl +++ b/CVSROOT/log_accum.pl @@ -49,6 +49,11 @@ $MAILCMD = "/usr/local/bin/mailsend -H"; $MAILADDRS = 'cvs-committers@FreeBSD.org cvs-all@FreeBSD.org'; +# Extra banner to add to top of commit messages. +# i.e. $MAILBANNER = "Project X CVS Repository"; +$MAILBANNER = ""; + + #------------------------------------------------------- # FreeBSD site localisation # Remember to comment out if using for other purposes. @@ -61,6 +66,7 @@ if (hostname() =~ /^(freefall|internat)\.freebsd\.org$/i) { } else { $crypto = 1; $meister = 'markm@FreeBSD.org'; + $MAILBANNER = "FreeBSD International Crypto Repository"; } } if ($debug && $freebsd) { @@ -302,6 +308,13 @@ sub build_header { $datestr = `/bin/date +"%Y/%m/%d %H:%M:%S %Z"`; chop($datestr); $header = sprintf("%-8s %s", $login, $datestr); + + my @text; + push @text, $header; + push @text, ""; + push @text, "$MAILBANNER\n" if $MAILBANNER; + + return @text; } # !!! Mailing-list and commitlog history file mappings here !!! @@ -512,14 +525,8 @@ if ($debug) { # single item in the argument list, and an empty log message. # if ($ARGV[0] =~ /New directory/) { - $header = &build_header(); - @text = (); - push(@text, $header); - push(@text, ""); - if ($freebsd and $crypto) { - push(@text, "FreeBSD International Crypto Repository"); - push(@text, ""); - } + @text = &build_header(); + push(@text, " ".$ARGV[0]); &do_changes_file(@text); #&mail_notification(@text); @@ -532,15 +539,7 @@ if ($ARGV[0] =~ /New directory/) { # single item in the argument list, and a log message. # if ($ARGV[0] =~ /Imported sources/) { - $header = &build_header(); - - @text = (); - push(@text, $header); - push(@text, ""); - if ($freebsd and $crypto) { - push(@text, "FreeBSD International Crypto Repository"); - push(@text, ""); - } + @text = &build_header(); push(@text, " ".$ARGV[0]); &do_changes_file(@text); @@ -676,18 +675,11 @@ if (-e "$LAST_FILE.$id") { # into a single message, fire a copy off to the mailing list, and drop # it on the end of the Changes file. # -$header = &build_header(); # # Produce the final compilation of the log messages # -@text = (); -push(@text, $header); -push(@text, ""); -if ($freebsd and $crypto) { - push(@text, "FreeBSD International Crypto Repository"); - push(@text, ""); -} +push @text, &build_header(); for ($i = 0; ; $i++) { last if (! -e "$LOG_FILE.$i.$id"); @lines = &read_logfile("$CHANGED_FILE.$i.$id", ""); |