1

I'm trying to send emails when a user locks/unlocks elements in a SVN repository through a hook using the Apache Mailer script (mailer.py). When the suitable hook is executed I'm obtaining the following error:

You need version 1.5.0 or better of the Subversion Python bindings.

I have installed the following tools:

  • VisualSVN 3.3.1 (Subversion 1.8.13)
  • Python 3.5.1 (I've tried with 32 and 64 bits versions)
  • Python SVN Extension (pysvn) v1.8 (for Python v3.5 and SVN 1.8.14)

Furthermore, I have Subversion 1.8.13 source code available.

The suitable hook (post-lock.cmd) has the following unique line:

<pythonHome>python.exe <repositoryHooks>mailer.py "%1" "%2" <repositoryHooks>mailer.conf

I've configured the PYTHONPATH as:

<subversion-1.8.13SourceCodePath>\subversion\bindings\swig\python;<pythonHome>/Lib;<visualSVNPath>PythonPackage

All the above configuration provokes the mentioned error.

Any idea of where I could obtain the 1.5.0 Python Subversion bindings and how I could configure them to allow the mailer script execution without errors?

Thank you so much in advance.

1 Answers1

1

VisualSVN Server installs Subversion bindings for Python 2.7 starting from version 3.2.0 [1]. So you need just install Python 2.7 of the same bitness as VisualSVN Server and run mailer.py. You should not configure PYTHONHOME environment variable, because VisualSVN Server registers PythonPackages directory via registry.

VisualSVN Server doesn't provide bindings for Python 3.5.x at this time.

[1] https://www.visualsvn.com/server/changes/3.2/

Ivan Zhakov
  • 3,981
  • 28
  • 24
  • Yeeees!!! That has been the solution. I hadn't realised that VisualSVN was related to the Python v2.7. Once I've installed that version, the hook has been executed and the email has been sent. Thank you so much for you help. I really appreciate it. – Marcos Antonio Dec 17 '15 at 16:12