[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

converting author variable using mailer.py

From: Stefan Vater <st.vater_at_web.de>
Date: Thu, 21 Apr 2011 09:57:57 +0200

Hi,

I have a problem configuring my post-commit hook for sending emails about
commits. I am using mailer.py with the configuration file mailer.conf.

The problem is that I need to modify the author variable from
"author1_at_domainA" (which is given to me by %(author)s as a whole) to
"author1_at_domainB" in order to have a valid from_addr to send the mail by
sendmail.

Right now, I have to convert every single author individually using the maps
feature, i.e. the configuration file looks like

[maps]
from_addr = [authors]

[authors]
author1_at_domainA = author1_at_domainB
author2_at_domainA = author2_at_domainB

[example-group]
from_addr = %(author)s

Although this seems to work, it is very inconvenient, since I have to add
each possible author this way. A better way would be to convert the author
by some regular expression or something like this. domainA and domainB are
static in my case.

I have to say that my access to the svn-server is very restricted, and
changes in mailer.conf would be the best way. Other possibilities, which
came into my mind, like changing mailer.py or a script in between mailer.py
and sendmail to convert the mail address might be also possible, but I am
not experienced in scripting it :-(

Any suggestions would be appreciated!

Regards,
Stefan
Received on 2011-04-21 11:45:40 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.