svn commit mail python stackdump

Questions regarding Subversion Server may go here
Forum rules
1) This is a user forum for Synology users to share experience/help out each other: if you need direct assistance from the Synology technical support team, please use the following form: ... p?lang=enu

2) To avoid putting users' DiskStation at risk, please don't paste links to any patches provided by our Support team as we will systematically remove them. Our Support team will provide the correct patch for your DiskStation model.
I'm New!
I'm New!
Posts: 2
Joined: Fri Dec 03, 2010 9:30 am

svn commit mail python stackdump

Unread post by bramr » Fri Dec 03, 2010 9:54 am

Hi all,

My DS210+ hosts some svn repos. CLients use ssh+svn for access.
I want to get commit-mail running.
Packages installed (amongst others):

Code: Select all

ipkg install python      # version 2.5-1
ipkg install svn           # version 1.6.15-1
ipkg install svn-py      # version 1.6.15-1
ipkg install py26-trac  # version 1.12.1-1 - yes, also running tracd  :D

python mail script: ... /
with config ... nf.example modified to my wishes.
File <repo-path>/hooks/post-commit:

Code: Select all

export PYTHONPATH=/opt/lib/svn-python
/home/svnsw/bin/ commit "$REPOS" "$REV" /home/svnsw/bin/mailer.conf
Note: I modified to full paths, and added PYTHONPATH, otherwise python fails to load the svn bindings.

Test the mailer from the command line results in a python stack dump:

Code: Select all

> ./post-commit /home/svnsw/sw/zz_try_app/svnroot 5
Traceback (most recent call last):
  File "/home/svnsw/bin/", line 1436, in <module>
  File "/opt/lib/svn-python/svn/", line 281, in run_app
    return func(application_pool, *args, **kw)
  File "/home/svnsw/bin/", line 101, in main
    repos = Repository(repos_dir, revision, pool)
  File "/home/svnsw/bin/", line 1122, in __init__
    self.root_this = self.get_root(rev)
  File "/home/svnsw/bin/", line 1136, in get_root
    root = self.roots[rev] = svn.fs.revision_root(self.fs_ptr, rev, self.pool)
  File "/opt/lib/svn-python/libsvn/", line 244, in svn_fs_revision_root
    return apply(_fs.svn_fs_revision_root, args)
TypeError: argument number 2:
I am stuck...
Can this be caused by a mistake in the mailer.conf file?
Some version incompatibility of installed packages?
Any suggestion how to fix this?

Thanks for any help, Bram.

I'm New!
I'm New!
Posts: 2
Joined: Fri Dec 03, 2010 9:30 am

Re: svn commit mail python stackdump

Unread post by bramr » Fri Dec 03, 2010 11:56 pm

Problem solved.

Somewhere around the line, I noticed package "python" requires python25,
while package "svn-py" requires python26.
So, the script invokes python 2.5.x (using the regular "python")
while it loads svn bindings based on python 2.6.x.
I considered that risky, so reinstalled all, but only the packages
based on python 2.6.x and not the regular python.
To obtain a "python" command, manually created synlink:

Code: Select all

ln -s python2.6 /opt/bin/python
Python stackdump is gone now.
Mailer works.

Posts: 10
Joined: Sat Mar 15, 2014 4:23 pm

Re: svn commit mail python stackdump

Unread post by TonySqrd » Wed Aug 12, 2015 5:41 am

Can you help me with this? What are the steps for making SVN send an email on code commits? I couldn't understand your explanation in your post.

Post Reply

Return to “Subversion Server”