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

Re: Problem with python + hook

From: Robert Dailey <rcdailey_at_gmail.com>
Date: Mon, 25 Aug 2008 11:58:26 -0500

On Mon, Aug 25, 2008 at 11:50 AM, John Peacock <
john.peacock_at_havurah-software.org> wrote:

> Robert Dailey wrote:
>> So, I ran the python script from the command line as suggested by John,
>> and it worked just fine. My next step was to setup some minimal file logging
>> in the post commit script, however I'm finding that the script fails when
>> run by subversion because the open() function in python does not have
>> sufficient privileges, for some reason. However I can run this manually from
>> the command line and the open() function succeeds.
> The script is run as the same user as Subversion itself, not as your user.
> That means that any files that are going to be changed by the script must
> be owned by or at least writeable by that user.
> You will need to switch that that user before testing, e.g.:
> # su svnuser -s /bin/bash
> You can rerun the script as many times as you want by just passing in the
> repository and revision on the commandline:
> $ ./post-commit $PWD/.. 23
> (assuming you are inside the REPOS/hooks directory and revision 23 was a
> revision where something interesting happened).

I actually setup xinetd to run svnserve as user 'svn', and I even switched
to user 'svn' to run the script and it still works fine when running the
post-commit manually. However, subversion running it doesn't work for some
Received on 2008-08-25 18:58:52 CEST

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.