svn强制写日志

来源:互联网 发布:淘宝店铺促销活动方案 编辑:程序博客网 时间:2024/06/05 14:23


REPOS="$1"
TXN="$2"


# Make sure that the log message contains some text.
SVNLOOK=/usr/bin/svnlook
$SVNLOOK log -t "$TXN" "$REPOS" | \
   grep "[a-zA-Z0-9]" > /dev/null || exit 1


# Check that the author of this commit has the rights to perform
# the commit on the files and directories being modified.
omments should have more than 5 characters
LOGMSG=$($SVNLOOK log -t "$TXN" "$REPOS" | grep [a-zA-Z0-9] | wc -c)
if [ "$LOGMSG" -lt 15 ];
then
echo -e "Please provide a meaningful comment when committing changes." 1>&2
exit 1

fi

pre-commit

0 0
原创粉丝点击