공백,, 빈줄 다 막음.
@echo off
:: Stops commits that have empty log message.
setlocal
set REPOS=%1
set TXN=%2
set SVNLOOK="svnlook.exe"
:: Make sure that the log message contains some text.
for /f "tokens=*" %%i in ('%SVNLOOK% log --transaction %TXN% %REPOS%') do set LOGMSG="%%i"
if "%LOGMSG%"=="" goto err
:: trim quotes
for /f "useback tokens=*" %%a in ('%LOGMSG%') do set LOGMSG=%%~a
if not defined LOGMSG goto err
if "%LOGMSG%"=="" goto err
:: trim white space
set LOGMSG=%LOGMSG: =%
if not defined LOGMSG goto err
if "%LOGMSG%"=="" goto err
goto success
:err
echo. 1>&2
echo Your commit has been blocked because youdidn't give any log message! 1>&2
echo Please write a log message describing the purpose of your chages and 1>&2
echo then try committing again. -- Thank you 1>&2
exit 1
:success
exit 0
'버전관리' 카테고리의 다른 글
svn 리비전 정보 넣기 (0) | 2015.04.02 |
---|---|
doxygen, graphviz, doxycomment (0) | 2012.08.07 |
Virtual Box 포트 포워딩(port forwarding) (0) | 2012.03.02 |
CruiseControl.Net 설치 (0) | 2012.03.02 |
moinmoin wiki 설치 (0) | 2011.06.11 |
CI (continuous integration) (0) | 2011.02.13 |