저장소 폴더를 보면 hooks 라는 폴더가 보이실 겁니다.
pre-commit.tmpl 라는 파일과 함께 다양한 tmpl 파일들이 보이실 겁니다.
– windows 서버의 경우 –
pre-commit.bat 파일을 만들고, 안에 아래의 내용을 채웁니다.
@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
svnlook log %REPOS% -t %TXN% | findstr . > nul
if %errorlevel% gtr 0 (goto err) else exit 0
:err
echo 로그를 작성하지 않으면 커밋을 할 수 없습니다. 1>&2
echo 로그를 작성하고 다시 시도하십시오. 1>&2
exit 1
@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
svnlook log %REPOS% -t %TXN% | findstr . > nul
if %errorlevel% gtr 0 (goto err) else exit 0
:err
echo 로그를 작성하지 않으면 커밋을 할 수 없습니다. 1>&2
echo 로그를 작성하고 다시 시도하십시오. 1>&2
exit 1
@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 svnlook log %REPOS% -t %TXN% | findstr . > nul if %errorlevel% gtr 0 (goto err) else exit 0 :err echo 로그를 작성하지 않으면 커밋을 할 수 없습니다. 1>&2 echo 로그를 작성하고 다시 시도하십시오. 1>&2 exit 1
자 이제 커밋시 로그가 없으면 커밋이 되지 않고 위의 문구가 나옵니다.
이와 관련하여 인터넷에 검색을 하면 linux용 스크립트 방식이 줄줄이 나옵니다.