> -----Original Message-----
> From: Ryan Schmidt [mailto:subversion-2008c_at_ryandesign.com]
> Sent: Monday, 25 August 2008 15:47
> To: John Niven
> Cc: Robert Dailey; David Weintraub; svn
> Subject: Re: Problem with python + hook
>
> > As far as I can remember the "#!/usr/bin/env ..." idiom is
> necessary
> > with Python, and since your hook scripts run with no environment
> > you'll need to specify where python is.
>
> Oh it is? Well I don't know Python. I'm sure the env idiom is
> useful when a path to python is in the environment, but even
> the Subversion source comes with a Python script that does
> not use this strategy:
>
> http://svn.collab.net/repos/svn/tags/1.5.1/tools/dist/write-
> announcement.py
>
> So I doubt it's absolutely required.
You're quite right; I believe it's preferred since you can specify the
Python version (e.g. "/usr/bin/env python2.2"), but that's hardly
relevant here.
(That'll teach me to post before remembering fully... It's been a while
since I last used Python)
Cheers
John
>
>
> >> None of these have had any effect.
>
> Did you also change to calling the absolute path of svn? See below.
>
>
> >>>>>> call( "svn", "update", "--non-interactive",
> "/srv/http/website" )
> >>>
> >>>
> >>> You need to specify the absolute path to the svn binary
> >> (and any other
> >>> binaries you want to use) since hooks run with an empty
> environment
> >>> for security reasons.
>
> Call svn with its absolute path as well, presumably:
>
> call( "/usr/local/bin/svn", "update", "--non-interactive",
> "/srv/http/ website" )
>
> Or wherever Subversion actually is on your system.
>
> Capture all error and regular output from this process and
> write it to a logfile of your own, with whatever syntax one
> uses for that in Python.
>
>
> If that doesn't help, try a simple post-commit hook which
> just writes a line to a file. Does it work?
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-08-25 05:58:52 CEST