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

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

From: Mark <grimm26_at_gmail.com>
Date: 2007-12-28 00:18:24 CET

Did you check the exit value?

On Dec 27, 2007 4:53 PM, Shane Huesdon <Shane.Huesdon@bcaa.com> wrote:
>
> Ah sorry I didn't articulate that well, my tests are all run without the
> file extension. I wrote and tested on a test installation of subversion.
> Unfortunately the test box is windows. Everything works perfectly there.
> That file list if from production, I can't leave the pre-commit script
> in effect there, I just bang off a quick test and then re-apply the file
> extension in an effort to not block actual dev commits with my busted
> hook scripts.
>
>
>
>
> ---------------------------------------------
> 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
>
>
>
>
>
>
> -----Original Message-----
> From: Mark [mailto:grimm26@gmail.com]
> Sent: Thursday, December 27, 2007 2:44 PM
> To: Shane Huesdon
> Cc: users@subversion.tigris.org
> Subject: Re: Subversion, Linux, and pre-commit hook script - no workie
>
> 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
>
>

-- 
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 Fri Dec 28 00:18:46 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.