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

Re: pre-commit.bat with return message

From: Nathan Kidd <nathan-svn_at_spicycrypto.ca>
Date: 2006-04-05 09:37:07 CEST

Andreas Guther wrote:
> I am working on getting a pre-commit.bat (Windows; not other choice) to return a message to the user in case of error.
>
> I just want to check that the user enters a comment and in case one is missing I want to give an error message back.
>
> Unfortunately I am not able to find a way to accomplish that. I am not sure if this is a dos command problem or a subversion communicating with dos problem.
>
> My dos batch script looks as follows:
>
> [... path settings ommited...]
> SVNLOOK.exe log -t "%2" "%1" | grep.exe "[a-zA-Z0-9]" > nul || GOTO ERROR
> GOTO OK
> :ERROR
> ECHO "Please enter comment and then retry commit!"

You need to echo to stderr, like this:

    echo Your message here. >&2

Note on win32 quotes are literally printed.

See also http://svn.haxx.se/users/archive-2006-03/0039.shtml

-Nathan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Apr 5 09:36:44 2006

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.