SVN提交提示添加注释

# pwd

/svn/www.wangshui.com/hooks

# vim pre-commit

#!/bin/sh

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 1 ]; then
echo -e "\n 提交文件时必须添加注释,提交中止."1>&2
exit 1
fi

posted @ 2015-11-17 09:45  消磨_时间  阅读(156)  评论(0)    收藏  举报