VisualSVN Server - Enforce Comments
Contents
setlocal
set REPOS=%1
set TXN=%2
set SVNLOOK="%PROGRAMFILES(X86)%\VisualSVN Server\bin\svnlook.exe"
REM Make sure that the log message contains some text.
FOR /F “usebackq delims==” %%g IN (%SVNLOOK% log -t %TXN% %REPOS% FINDSTR /R /C:......) DO goto NORMAL_EXIT
:ERROR_TOO_SHORT
echo “Must provide comments” >&2
goto ERROR_EXIT
:ERROR_EXIT
exit /b 1
REM All checks passed, so allow the commit.
:NORMAL_EXIT
exit 0
2012-01-03: Post on StackOverflow on this: http://stackoverflow.com/questions/247888/how-to-require-commit-messages-in-visualsvn-server
