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
reason.
Received on 2008-08-25 18:58:52 CEST