You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Tim Armes <ta...@fr.imaje.com> on 2003/11/12 14:32:58 UTC
Hook error messages
Hi,
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") ?
Regards,
Tim
###########################################
This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.
For more information, connect to http://www.F-Secure.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Hook error messages
Posted by Philip Martin <ph...@codematters.co.uk>.
"C. Michael Pilato" <cm...@collab.net> writes:
> Tim Armes <ta...@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
Re: Hook error messages
Posted by "C. Michael Pilato" <cm...@collab.net>.
Tim Armes <ta...@fr.imaje.com> writes:
> Hi,
>
> 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") ?
Ideally, we'd be snarfing up stderr and sending that back to the user
(though... that might be a *whole* lotta data, hm...). Not sure what
to suggest here. Hey, worst-case, you could email the user. :-)
Dear <username>,
Recently you attempted a commit to the repository located at
http://my.server.com/repos/svn, but you failed to supply a
non-empty log message. You shall cease and desist from similar
errors of omission in the future -- or I'll be forced to dispatch
my team of expert thugs.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org