svn comment 강제하기
기타 / 2012. 12. 22. 09:40
http://junghun.com/xe/index.php?document_srl=5069&vid=textyle
1. pre-commit 파일 작성
cd ~Repository/hooks/
cp pre-commit.tmpl pre-commit
2. 작성 내용
REPOS="$1"
TXN="$2"
# Make sure that the log message contains some text.
SVNLOOK=/usr/bin/svnlook
LOGMSG=$($SVNLOOK log -t "$TXN" "$REPOS" | grep [a-zA-Z0-9] | wc -c)
if [ "$LOGMSG" -lt 5 ]; then
/bin/echo -n "(Empty commit log) & (length(log) < 5) is NOT ALLOWED" 1>&2
exit 1
fi
exit 0