Lenmore Blog -- 我的记事本、备忘录

SVN强制输入日志信息的hook-script

written on Friday, September 4, 2009

pre-commit.bat

@echo off
set REP=%1
set TXN=%2
set tmp=svnlook.tmp
svnlook log -t %TXN% %REP% > %tmp%

for /F "tokens=*" %%f in (%tmp%) do goto Hell

echo "Please write log message and commit again!" 1>&2
exit 1

:Hell
if exist %tmp% del %tmp%
exit 0

This entry was tagged svn