Neither pre-commit.py nor pre-commit.tmpl will run. It needs to be
exactly named pre-commit. pre-commit, in particular, need to exit
with 0 in order for the commit to be allowed. Anything else is
considered an error and the commit is abandoned.
On Dec 27, 2007 4:24 PM, Shane Huesdon <Shane.Huesdon@bcaa.com> wrote:
>
>
> Hey all, new to the list but been on subversion since day 1 of 1.4.0
>
> I have been googling all day on this one.
>
> Basically my problem is that hook scripts do not appear to work at all in my
> repository, even the basic .tmpl scripts.
>
> I have tried hello world scripts for python and .sh but everything fails as
> follows...
>
> From the apache log...
> [Thu Dec 27 13:26:09 2007] [error] [client 192.197.4.26] Could not MERGE
> resource "/repos/!svn/act/a9c4a960-938c-b348-8397-ec7fb6d8eb0a" into
> "/repos/branches/4.1.0/Batch/Shared". [409, #0]
> [Thu Dec 27 13:26:09 2007] [error] [client 192.197.4.26] An error occurred
> while committing the transaction. [409, #165001]
> [Thu Dec 27 13:26:09 2007] [error] [client 192.197.4.26] 'pre-commit' hook
> failed with error output:\n [409, #165001]
>
> Hook script file details...
> -rwxr-xr-x 1 svn svn 223 Dec 27 11:36 pre-commit.py
> -rwxr-xr-x 1 svn svn 2940 Oct 26 2006 pre-commit.tmpl
>
> I have read many people talking about the lack of ENV and how you need to
> create the environment inline to the script as subversion launches the hook
> scripts with no ENV for security. Would that only be relevent if you were
> calling something that needs a path or whatnot, a simple hello work print
> statement should be fine with no environment, no?
>
> Example script that failed....
> #!/bin/sh
> # This is a comment!
> /bin/echo Hello World # This is a comment, too!
>
> It runs when I run it as the svn user on the command line.
>
>
>
>
>
>
>
>
>
> ---------------------------------------------
> Shane Huesdon
> BCAA Information Services
> 4567 Canada Way, Burnaby, BC V5G 4T1
> Phone: 604.268.5425
> Cell: 604.329.0936
> Email: Shane.Huesdon@bcaa.com
>
>
>
>
> WARNING - CONFIDENTIALITY NOTICE This e-mail and any attachments may
> contain confidential and privileged information. Any use, disclosure,
> copying or dissemination of this information by a person other than an
> intended recipient is not authorized and may be illegal. If you are not an
> intended recipient, please notify the sender immediately by return e-mail,
> delete this e-mail and destroy any copies. Thank you.
--
Mark
"Blessed is he who finds happiness in his own foolishness, for he will
always be happy."
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Dec 27 23:43:49 2007