SVN: repo-scripts: mailer.conf mailer.py
twittner
cvs at pld-linux.org
Sat Sep 9 01:45:26 CEST 2006
Author: twittner
Date: Sat Sep 9 01:45:22 2006
New Revision: 7742
Modified:
repo-scripts/mailer.conf
repo-scripts/mailer.py
Log:
- allow to compose e-mail addres in `From:' from revision's
author and given domain name - was `user <cvs at pld-linux.org>'
should be `user <user at pld-linux.org>'
- to svn admin: please synchronize scripts installed on svn
server with repo-scripts/mailer.{conf,py} from svn
Modified: repo-scripts/mailer.conf
==============================================================================
--- repo-scripts/mailer.conf (original)
+++ repo-scripts/mailer.conf Sat Sep 9 01:45:22 2006
@@ -131,6 +131,11 @@
# The default prefix for the Subject: header
subject_prefix = SVN:
+# `from_addr_domain' (when is set, `from_addr' has no efect)
+# When is set, `From:' will be composed of revision author, '@'
+# and from_addr_domain # value: e.g. author <author at domain.dom>
+from_addr_domain = pld-linux.org
+
# The default From: and To: addresses for commit messages. If the
# from_addr is not specified or it is specified but there is no text
# after the `=', then the revision's author is used as the from
@@ -139,7 +144,8 @@
# then the string 'no_author' is used. You can specify a default
# from_addr here and if you want to have a particular for_repos group
# use the author as the from address, you can use "from_addr =".
-from_addr = cvs at pld-linux.org
+# `from_addr' has no efect when `from_addr_domain' is set.
+# from_addr = cvs at pld-linux.org
to_addr = pld-cvs-commit at lists.pld-linux.org
# If this is set, then a Reply-To: will be inserted into the message
Modified: repo-scripts/mailer.py
==============================================================================
--- repo-scripts/mailer.py (original)
+++ repo-scripts/mailer.py Sat Sep 9 01:45:22 2006
@@ -148,10 +148,15 @@
def start(self, group, params):
self.to_addr = self.cfg.get('to_addr', group, params)
- self.from_addr = self.cfg.get('from_addr', group, params) or \
- self.repos.author or 'no_author'
- self.from_hdr = "%s <%s>" % (self.repos.author, \
- self.cfg.get('from_addr', group, params))
+ author = self.repos.author or 'no_author'
+ from_addr_domain = self.cfg.get('from_addr_domain', group, params)
+
+ if not from_addr_domain:
+ self.from_addr = self.cfg.get('from_addr', group, params) or author
+ else:
+ self.from_addr = author + '@' + from_addr_domain
+
+ self.from_hdr = "%s <%s>" % (author, self.from_addr)
self.reply_to = self.cfg.get('reply_to', group, params)
def mail_headers(self, group, params):
More information about the pld-cvs-commit
mailing list