This is Noah Gift's Coding Blog. I only talk about coding and technical stuff here, and that is mostly Python, although I will mix in some other languages, and talk about Artificial Intelligence.

Wednesday, October 29, 2008

Getting Trac/SVN commits to send emails

Step 1: edit trac.ini section [notification]:


[notification]
admit_domains =
always_notify_owner = true
always_notify_reporter = true
always_notify_updater = true
ignore_domains =
mime_encoding = base64
smtp_always_bcc =
smtp_always_cc = noah.gift@example.com, foo@example.com
smtp_default_domain =
smtp_enabled = true
smtp_from = trac@example.com
smtp_from_name = ticket system
smtp_password =
smtp_port = 25
smtp_replyto = noah.gift@example.com
smtp_server = localhost
smtp_subject_prefix = __default__
smtp_user =
ticket_subject_template = $prefix #$ticket.id: $summary
use_public_cc = false
use_short_addr = false
use_tls = false


Step 2: edit /hooks/post-commit and make it executable in your subversion repository


/usr/share/doc/subversion-1.4.2/tools/hook-scripts/commit-email.pl -h localhost "$REPOS" "$REV" foo@example.com noah.gift@example.com


Note, if you somehow can't find or don't have that script on your machine you just "google" for commit-email-pl. I am fairly certain there is a python script for emailing as well.

2 comments:

Alfredo said...

Webstatus has an emailing script called mailer.py that works with gmail

code.google.com/a/webstatus

Noah Gift said...

I guess I need to start putting a lot of my code into a central repository, like mailing scripts.