这边公司svn需要设置拦截请求

1 设置必须注释至少5个字符才能提交

LOGMSG=`$SVNLOOK log -t "$TXN" "$REPOS" | grep "[a-zA-Z0-9]" | wc -c`
if [ "$LOGMSG" -lt 5 ];
then
   echo -e "大哥你要写点注释啊,不然不能提交." 1>&2
   exit 1
fi
# All checks passed, so allow the commit.
exit 0

2 提交代码时,后缀不能有关键字

classPath|project|settings|idea|iml|class
# file filter: we only allow commit .c && .h files.
FILTER='\.(classPath|project|settings|idea|iml|class)$'
files=$($SVNLOOK changed -t $TXN $REPOS | awk '{print $2}')
# check
for f in $files
do
    # check file type
    if echo $f | grep -Eq $FILTER ; then
        # valid file
        echo "File $f is a .classPath or .project or .settings or .idea or .iml or .class file" >> /dev/stderr
        exit 1
    fi
done
exit 0