4

I am trying to setup a post-commit hook in my Subversion server to send email notifications on commits. I am trying to use the mailer.py script that came with my Subversion installation. However, when the script is executed by the hook, I get this error message:

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

I followed the instructions and installed py33-pysvn-svn178-1.7.7-1497 from this url: http://pysvn.tigris.org/servlets/ProjectDocumentList?folderID=1768

But I'm still getting the same error. Any ideas what is missing?

My svn server is version 2.5.9. I already have python 3.3 installed on my server. I am using OS Windows Server 2008.

bahrep
  • 29,961
  • 12
  • 103
  • 150

1 Answers1

0

In the file mailer.py just after the main list of imports you find two reasons for the error message 1) svn.core cannot be imported, or 2) the version number in svn.core is too low. svn.core can be found in Python-3.1.3/Lib/distutils/core.py

    # Minimal version of Subversion's bindings required
    _MIN_SVN_VERSION = [1, 5, 0]

    # Import the Subversion Python bindings, making sure they meet our
    # minimum version requirements.
    try:
      import svn.fs
      import svn.delta
      import svn.repos
      import svn.core
    except ImportError:
      sys.stderr.write(
        "You need version %s or better of the Subversion Python bindings.\n" \
        % string.join(map(lambda x: str(x), _MIN_SVN_VERSION), '.'))
      sys.exit(1)
    if _MIN_SVN_VERSION > [svn.core.SVN_VER_MAJOR,
                           svn.core.SVN_VER_MINOR,
                           svn.core.SVN_VER_PATCH]:
      sys.stderr.write(
        "You need version %s or better of the Subversion Python bindings.\n" \
        % string.join(map(lambda x: str(x), _MIN_SVN_VERSION), '.'))
      sys.exit(1)
Marichyasana
  • 2,966
  • 1
  • 19
  • 20