现在的位置: 首页 > 综合 > 正文

SVN强制用户添加注释

2017年12月26日 ⁄ 综合 ⁄ 共 352字 ⁄ 字号 评论关闭
vim pre-commit

# Check that the author of this commit has the rights to perform
# the commit on the files and directories being modified.
#commit-access-control.pl "$REPOS" "$TXN" commit-access-control.cfg || exit 1

#强制用户添加注释
LOGMSG=`$SVNLOOK log -t "$TXN" "$REPOS" | grep "[a-zA-Z0-9]" | wc -c`
if [ "$LOGMSG" -lt 7 ]
then 
  echo -e "注释信息不能为空,请添加至少7个字符的注释" 1>&2 
  exit 1 
fi

# All checks passed, so allow the commit.
exit 0

【上篇】
【下篇】

抱歉!评论已关闭.