I want to force commit comment so I make a pre-commit.bat and setting under hook folder It's working well abort no comment commit message. but I have a problem that i can't see any error message from svn server.
my environment is windows7 and use eclipse, subversion
and server os is windows server 2008
and pre-commit.bat source is
@echo off
:: Stops commits that have empty log messages.
@echo off
setlocal
REM Subversion sends through the path to the repository and transaction id
SET "REPOS=%~1"
SET "TXN=%~2"
SET "SVNLOOK=C:\Progra~\Subversion\bin\svnlook.exe"
for /f "tokens=1 delims=/" %%i in ('%SVNLOOK% log -t "%TXN%" "%REPOS%"') do set "COMMENT=%%i"
if "%COMMENT%" == "" (goto comment_err)
for /f "tokens=2 delims=/" %%j in ('%SVNLOOK% log -t "%TXN%" "%REPOS%"') do set "ID=%%j"
if "%ID%" == "" (goto id_err)
for /f "tokens=3 delims=/" %%k in ('%SVNLOOK% log -t "%TXN%" "%REPOS%"') do set "MYDATE=%%k"
if "%MYDATE%" == "" (goto date_err)
exit 0
:comment_err
echo. 1>&2
echo Committing has been blocked! 1>&2
echo Because comment is empty! 1>&2
echo Please write a comment and try committing again. 1>&2
echo Message format is [comment]/[author]/[YYYY-MM-DD] 1>&2
echo Thank you 1>&2
exit 1
:id_err
echo. 1>&2
echo Committing has been blocked! 1>&2
echo Because author is empty! 1>&2
echo Please write a author and try committing again. 1>&2
echo Message format is [comment]/[author]/[YYYY-MM-DD] 1>&2
echo Thank you 1>&2
exit 1
:date_err
echo. 1>&2
echo Committing has been blocked! 1>&2
echo Because date is empty! 1>&2
echo Please write a date and try committing again. 1>&2
echo Message format is [comment]/[author]/[YYYY-MM-DD] 1>&2
echo Thank you 1>&2
exit 1
ps. I already check. echo "text" 1>&2 and It's very strange things. when i test on local the error message is dispalying well. but i set on my svn server. I can't see any error message on my eclipse.