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

Difficulty with post-commit emails

From: Matthew Pounsett <matt_at_conundrum.com>
Date: Mon, 9 Jul 2012 14:43:40 -0400

Apologies if this is handled on the list recently, but I haven't had any luck googling an answer.. don't see anything in the manual either.

Although I've done lots of upgrades, it's been a while since I installed a new subversion server completely from scratch, so I'm just now running into the fact that commit-email.py has been deprecated. commit-email.rb has no useful documentation .. not even a basic usage summary.. so I'm trying to get mailer.py working. I've run into an error I can't explain though, and I'm hoping someone has a pointer for me.

This is using subversion 1.7.5 and the mailer.py and python bindings that come with it, both installed out of ports on a FreeBSD box.

My mailer.conf file is present in the same directory as mailer.py, and is pretty much the default with the addition of a catch-all group at the end of the file:

> diff mailer.conf.example mailer.conf
24c24
< #smtp_hostname = localhost

---
> smtp_hostname = localhost
361a362,365
> [catchall]
> for_repos = /var/svn/repos/(?P<repo>[^/]*)
> to_addr   = commit-%(repo)@conundrum.com
> from_addr = svnadmin_at_conundrum.com
I'm working with a test repository:
> ls /var/svn/repos/svn-test/
README.txt conf       dav        db         format     hooks      locks
Subversion is running as an Apache module, so I'm expecting mailer to be run by the www user.  I get the following error:
> sudo -u www ./mailer.py commit svn-test 10
Traceback (most recent call last):
  File "./mailer.py", line 1435, in <module>
    sys.argv[3:3+expected_args])
  File "/usr/local/lib/python2.7/site-packages/svn/core.py", line 307, in run_app
    return func(application_pool, *args, **kw)
  File "./mailer.py", line 100, in main
    repos = Repository(repos_dir, revision, pool)
  File "./mailer.py", line 1116, in __init__
    self.repos_ptr = svn.repos.open(repos_dir, pool)
  File "/usr/local/lib/python2.7/site-packages/libsvn/repos.py", line 212, in svn_repos_open
    return _repos.svn_repos_open(*args)
svn.core.SubversionException: 2 - Can't open file 'svn-test/format': No such file or directory
The file svn-test/format is clearly present.  This isn't just environment.. I get the same error passed back when mailer.py is run by a post-commit script.  Is there something else here I'm missing?
Received on 2012-07-09 20:44:13 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.