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

Subversion, Linux, and pre-commit hook script - no workie

From: Shane Huesdon <Shane.Huesdon_at_bcaa.com>
Date: 2007-12-27 23:24:56 CET

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
 
 
 
 
 
Received on Thu Dec 27 23:25:16 2007

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.