svn commit mail python stackdump

Questions regarding Subversion Server may go here
Forum rules
Please note the disclaimer before modifying your Synology Product.

svn commit mail python stackdump

Postby 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: http://svn.apache.org/repos/asf/subvers ... /mailer.py
with config http://svn.apache.org/repos/asf/subvers ... nf.example modified to my wishes.
File <repo-path>/hooks/post-commit:
Code: Select all
#!/bin/sh
REPOS="$1"
REV="$2"
export PYTHONPATH=/opt/lib/svn-python
/home/svnsw/bin/mailer.py 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/mailer.py", line 1436, in <module>
    sys.argv[3:3+expected_args])
  File "/opt/lib/svn-python/svn/core.py", line 281, in run_app
    return func(application_pool, *args, **kw)
  File "/home/svnsw/bin/mailer.py", line 101, in main
    repos = Repository(repos_dir, revision, pool)
  File "/home/svnsw/bin/mailer.py", line 1122, in __init__
    self.root_this = self.get_root(rev)
  File "/home/svnsw/bin/mailer.py", 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/fs.py", 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.
bramr
I'm New!
I'm New!
 
Posts: 2
Joined: Fri Dec 03, 2010 9:30 am

Re: svn commit mail python stackdump

Postby 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 mailer.py 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.
bramr
I'm New!
I'm New!
 
Posts: 2
Joined: Fri Dec 03, 2010 9:30 am


Return to Subversion Server

Who is online

Users browsing this forum: No registered users and 1 guest