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

Re: Email commit log in Windows.

From: John Szakmeister <john_at_szakmeister.net>
Date: 2004-12-15 12:31:52 CET

On Tuesday 14 December 2004 19:32, Victor Hadianto wrote:
> > I assume you're talking about a post-commit hook to email information
> > about the commit, including the log message. If so, then take a look
>
> at
>
> > the following:
> >
> > http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/mailer/
> >
> > You'll need Python and the Subversion Python bindings for Windows as
> > well. You can get the latter from here:
> >
> > http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91
>
> Thanks for this, yes I mean post-commit hook. Is there a doc somewhere
> how to integrate the language binding? The readme that comes with the
> Python binding doesn't tell much.

The easiest thing to do is to drop the python directory (in the *_py.zip
file) into your Subversion install directory. After installing Python,
go to the site-packages/ directory and create a file called svn.pth, and
put the path to the python directory of your Subversion installation in
it. For example, I installed SVN to C:\svn. I would extract python/
directory of the *_py.zip file into C:\svn. Then the bindings would be
located at C:\svn\python. I have Python installed at C:\Python2.3. So I
would create a file name C:\Python2.3\site-packages\svn.pth, that has 1
line in it: C:\svn\python.

You can do a quick check to ensure by doing the following at the command
line:

C:\> python -c "import svn"

If you get an error about "No module named svn", then you did something
wrong. :-)

> Also how do I hook the mailer script?

You can create a post-commit.bat, that has the following:
@C:\python2.3\python.exe mailer.py commit "%1" "%2" \path\to\mailer.conf

You'll need to create a mailer.conf that's suitable for your setup.

-John

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Dec 15 12:34:16 2004

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.