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

Re: customizing the error message

From: Greg Cerveny <greg.cerveny_at_gmail.com>
Date: 2007-04-27 00:04:59 CEST

I can't seem to get the windows batch file to return correctly.

I've tried:

ECHO "no log message written"
EXIT 1

and

ECHO "no log message written" 1

and

ECHO "no log message written"
1

Any windows users out there get this to work?

2007/4/26, Ryan Schmidt <subversion-2007b@ryandesign.com>:
> On Apr 26, 2007, at 14:18, Greg Cerveny wrote:
>
> > 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?
>
> I think it works on Windows the same way it works on Unix:
>
> echo "Here's my error message" 1>&2
>
> Do that before you exit 1.
>
>
> --
>
> To reply to the mailing list, please use your mailer's Reply To All
> function
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Apr 27 00:05:15 2007

This is an archived mail posted to the Subversion Users mailing list.