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

customizing the error message

From: Greg Cerveny <greg.cerveny_at_gmail.com>
Date: 2007-04-26 21:18:17 CEST

I would like to customize the error message display when a hook script
rejects an action from a user.

I've created a couple subversion hook scripts (windows batch files).
One allows users to modify logs and the other prevents a user from
committing changes.

Here is what happens when I commit with no log:

C:\dev>svn commit -m ""
Sending locks.txt
Transmitting file data .svn: Commit failed (details follow):
svn: 'pre-commit' hook failed with error output:

Here is my batch file:

@echo OFF
REM verifies that the commit has a log message
set REPOS="%1"
set TXN="%2"
set ENTRY=""
for /F "tokens=1*" %%a in ('svnlook log -t %TXN% %REPOS%') do set
ENTRY="%%a %%b"
if %ENTRY% == "" (exit 1) else (exit 0)

Any ideas on customizing the returned error?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Apr 26 21:18:39 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.