标签:pre-commit 钩子 强制写日志
#!/bin/sh
repos="$1"
txn="$2"
res="ok"
# make sure that the log message contains some text.
svnlook=/usr/local/svn/bin/svnlook
$svnlook log -t "$txn" "$repos" | egrep "[^[:space:]]+" >/dev/null || unset res
if [ "$res" != "ok" ]
then
echo "you must input some comments for you commit" >&2
exit 1
fi
# all checks passed, so allow the commit.
exit 0
pre-commit脚本--commit前必须填写messages
标签:pre-commit 钩子 强制写日志
原文地址:http://mysky0708.blog.51cto.com/474802/1922181