[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: John Peacock <john.peacock_at_havurah-software.org>
Date: Mon, 25 Aug 2008 12:50:55 -0400

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).


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 18:51:21 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.