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

Re: pre-commit hook returns 409 failure

From: Jette Derriche <jette_at_nerdgirl.dk>
Date: 2007-09-17 21:23:21 CEST

On Mon, 2007-09-17 at 20:45 +0200, Rainer Sokoll wrote:
> On Mon, Sep 17, 2007 at 08:37:40PM +0200, Jette Derriche wrote:
>
> > I have incorporated your script into mine... but now I get:
> >
> > ----------------------
> > svn: 'pre-commit' hook failed with error output:
> > declare: not found
>
> Declare is a bash builtin command. Seems that your /bin/sh is a bourne
> shell, not a bash.
>

Okay, I've changed /bin/sh to /bin/bash ... but now I am back to square
one. I still don't get error message as part of the output:

--------------------------------
svn: Commit failed (details follow):
    svn: Commit failed (details follow):
svn: 'pre-commit' hook failed with error output:
svn: MERGE of '/path/to/repo/project': 409 Conflict
(http://svn.example.com)
--------------------------------

My script:

--------------------------------
#!/bin/bash
REPOS="$1"
TXN="$2"

define -i RC_ALL=0

# Make sure that the log message contains some text.
SVNLOOK=/usr/local/bin/svnlook
$SVNLOOK log -t "$TXN" "$REPOS" | \
   grep "[a-zA-Z0-9]" > /dev/null \
         || { RC_ALL+=1 echo -e "$0:\nLog message empty!!!\n " 1>&2; }

# All checks passed, so allow the commit.
exit ${RC_ALL}
------------------------------

/Jette

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Sep 17 21:23:49 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.