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

Re: Hook error messages

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2003-11-12 19:32:59 CET

"C. Michael Pilato" <cmpilato@collab.net> writes:

> Tim Armes <tarmes@fr.imaje.com> writes:
>>
>> I've just started using a hook to ensure that the log messages aren't empty.
>> Unfortunately, when a user tries to commit using a blank error message, they
>> simply get told that the merge operation has failed. Is there a way to
>> improve this, so that the user gets told why it failed (i.e. "You must
>> supply an log message") ?

#!/bin/sh
echo "You must supply a log message" >&2
exit 1

> Ideally, we'd be snarfing up stderr and sending that back to the user

We appear to do just that

$ svn mkdir http://localhost:8888/obj/repo/foo
../svn/subversion/libsvn_ra_dav/util.c:628: (apr_err=165001)
svn: A repository hook failed
svn: MERGE request failed on '/obj/repo'
../svn/subversion/libsvn_ra_dav/util.c:348: (apr_err=165001)
svn:
'pre-commit' hook failed with error output:
You must supply a log message

../svn/subversion/clients/cmdline/util.c:357: (apr_err=165001)
svn: Your commit message was left in a temporary file:
../svn/subversion/clients/cmdline/util.c:358: (apr_err=165001)
svn: 'svn-commit.tmp'

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Nov 12 19:34:04 2003

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.