REPOS="$1"
TXN="$2"
SVNLOOK=/usr/bin/svnlook
#LOGMSG=`$SVNLOOK log -t "$TXN" "$REPOS"|grep "[a-zA-Z0-9]" |wc -c`
LOGMSG=`$SVNLOOK log -t "$TXN" "$REPOS" | tr -d ' ' | wc -c`
#LOGMSG=`$SVNLOOK log -t $TXN $REPOS | wc -m`
#$SVNLOOK log -t "$TXN" "$REPOS" | \
echo -e "Comment cann't be empty! You must input at least 64 characters or 5 Chinese characters!" 1>&2
exit 1
fi
# 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
# All checks passed, so allow the commit.
TXN="$2"
SVNLOOK=/usr/bin/svnlook
#LOGMSG=`$SVNLOOK log -t "$TXN" "$REPOS"|grep "[a-zA-Z0-9]" |wc -c`
LOGMSG=`$SVNLOOK log -t "$TXN" "$REPOS" | tr -d ' ' | wc -c`
#LOGMSG=`$SVNLOOK log -t $TXN $REPOS | wc -m`
#$SVNLOOK log -t "$TXN" "$REPOS" | \
# grep "[a-zA-Z0-9]" > /dev/null || exit 1
echo -e "Comment cann't be empty! You must input at least 64 characters or 5 Chinese characters!" 1>&2
exit 1
fi
# 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
# All checks passed, so allow the commit.
exit 0
注意:
1.一个汉字对应16个字符。
2.一定要添加文件权限