I'm a moron today...
ECHO "no log message written" 1>&2
EXIT 1
works great.
Thanks!
2007/4/26, Greg Cerveny <greg.cerveny@gmail.com>:
> 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:26:48 2007