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

pre-commit hook returns 409 failure

From: Jette Derriche <jette_at_nerdgirl.dk>
Date: 2007-09-15 17:54:11 CEST

Hi,

I have this hook based on the template that comes with subversion:

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

# 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 || exit 1

# Check that the author of this commit has the rights to perform
# the commit on the files and directories being modified.
#commit-access-control.pl "$REPOS" "$TXN" commit-access-control.cfg ||
exit 1

# All checks passed, so allow the commit.
exit 0
------------------------------------------------

This is what I get when I commit with an empty message:

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

Of cause the commit should fail since I didn't supply a message. But the
409 error isn't very user friendly... I would like it to tell the user
that he should supply a message...

How do I do that?

Here's some version info:
Apache 2.2.3
Subversion 1.4.3 (on both client and server)
PHPeclipse 3.2.0

Thanks :-)

/Jette

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