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

sed style replacement in mailer.py's configuration file

From: Blair Zajac <blair_at_orcaware.com>
Date: 2003-04-09 03:59:19 CEST

Need some more Python fu.

I have 8 separate repositories, some of which are two words
concatenated together with a _, such as "acme_dynamite".

I have a Mailman mailing list named svn-acme-dynamite-checkins and
would like to use mailer.py's regular expression matching to use
"for_repos" to catch the repository name and create the mailing list
name from it.

Right now I can do this

to_addr = svn_%(repos)s_checkins@abc.com

and set up an /etc/alias from svn_acme_dynamite_checkins to
svn-acme-dynamite-checkins, but the mail archive and outgoing mail
will have an odd email address.

I could set up a separate section in mailer.conf for each repository,
but that wastes the regex capabilities of mailer.py.

Is there some easy way to have a s/_/-/ done on matching strings? Is
this built into Python's %(var)s that I could use without modifying
mailer.py?

Best,
Blair

--
Blair Zajac <blair@orcaware.com>
Plots of your system's performance - http://www.orcaware.com/orca/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Apr 9 04:00:07 2003

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

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