aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetWeb
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2007-02-04 19:24:00 +0000
committerErik Schnetter <schnetter@cct.lsu.edu>2007-02-04 19:24:00 +0000
commitf077b9a360a7b850087408630a2f074dd68b5f6c (patch)
treecb147458b4240cbd5f3e6fb5b74da76b9e4bb7fc /Carpet/CarpetWeb
parent26e9cf4082ad26f9bc37d2794fef8673a23c8ea3 (diff)
CarpetWeb: Update script darcs0
Use "use strict". Allow different mailing lists for different repositories. darcs-hash:20070204192417-dae7b-53f3b63bedc65dcdf0a847799d1c0c0e1ed6872b.gz
Diffstat (limited to 'Carpet/CarpetWeb')
-rwxr-xr-xCarpet/CarpetWeb/scripts/darcs025
1 files changed, 17 insertions, 8 deletions
diff --git a/Carpet/CarpetWeb/scripts/darcs0 b/Carpet/CarpetWeb/scripts/darcs0
index 8ec50d35e..82ee739d4 100755
--- a/Carpet/CarpetWeb/scripts/darcs0
+++ b/Carpet/CarpetWeb/scripts/darcs0
@@ -4,9 +4,12 @@
# Some changes by Erik Schnetter <schnetter@aei.mpg.de>
# GPL licenced
+use strict;
+
### some constants
# list of email addresses to send notifications to
-my $email_list = 'carpet-darcs@lists.carpetcode.org';
+my $email_list_standard = 'carpet-darcs@lists.carpetcode.org';
+my $email_list_experimental = 'carpet-experimental-darcs@lists.carpetcode.org';
# where to find the real darcs executable
my $darcs = '/home/darcs/bin/darcs1';
@@ -27,7 +30,7 @@ print LOG "date: ", `date`, "\n";
print LOG "arguments: ", join (' ', @ARGV), "\n";
# short cut for darcs commands other than 'apply --all'
-$repodir = '';
+my $repodir = '';
exec ($darcs, @ARGV)
if (! ($#ARGV == 1 && ($ARGV[0] eq 'apply' && $ARGV[1] eq '--all')) &&
! ($#ARGV == 3 && ($ARGV[0] eq 'apply' && $ARGV[1] eq '--all' &&
@@ -101,8 +104,19 @@ print LOG "(that was the patch set)\n";
print LOG "submitters: ", join (' ', %submitters), "\n";
print LOG "done.\n";
+if ($repodir eq '') {
+ $repodir = `pwd`;
+ chomp $repodir;
+}
+$repodir =~ s+^.*/home/+~+;
+
+my $email_list = $email_list_standard;
+if ($repodir eq '~darcs/carpet-experimental') {
+ $email_list = $email_list_experimental;
+}
+
# now send out notification email(s)
-foreach $patch (keys %submitters)
+foreach my $patch (keys %submitters)
{
# Not safe, because the shell expands meta-characters:
#open (NOTIFY, "| mail -s '$patch' $email_list");
@@ -112,11 +126,6 @@ foreach $patch (keys %submitters)
open (NOTIFY, '|-') || exec 'mail', '-s', $patch, $email_list;
#print NOTIFY "A new patch has been pushed into the Carpet repository:\n\n";
- if ($repodir eq '') {
- $repodir = `pwd`;
- chomp $repodir;
- }
- $repodir =~ s+^.*/home/+~+;
print NOTIFY "The Carpet repository at $repodir received a new patch:\n\n";
print NOTIFY " $patch\n\n";
print NOTIFY "This patch was recorded by " .