[Python-checkins] hooks: Allow configuring a different sender (needed for stackless repo, where the
local
python-checkins at python.org
Sat Sep 24 13:40:01 CEST 2011
http://hg.python.org/hooks/rev/2e98611111f1
changeset: 77:2e98611111f1
user: Georg Brandl <georg at python.org>
date: Sat Sep 24 13:40:00 2011 +0200
summary:
Allow configuring a different sender (needed for stackless repo, where the notification goes to an address at a different domain).
files:
mail.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/mail.py b/mail.py
--- a/mail.py
+++ b/mail.py
@@ -76,7 +76,10 @@
if to is None:
print 'no email address configured'
return False
- sender = '%s <%s>' % (user, to)
+ from_ = ui.config('mail', 'sender', None)
+ if from_ is None:
+ from_ = to
+ sender = '%s <%s>' % (user, from_)
prefixes = [path]
--
Repository URL: http://hg.python.org/hooks
More information about the Python-checkins
mailing list