CentOS7 Setting SVN pre-commit hook@[Langzidanxin]
-
Marked the following two lines:
1.1 #$ S V N L O O K l o g − t " SVNLOOK log -t " SVNLOOKlog−t"TXN" “$REPOS” |
grep “[a-zA-Z0-9]” > /dev/null || exit 11.2 #commit-access-control.pl “ R E P O S " " REPOS" " REPOS""TXN” commit-access-control.cfg || exit 1
-
Add the following codes:
LOGMSG=$SVNLOOK log -t "$TXN" "$REPOS" | sed 's/[[:space:]]//g' | wc -c
if [ ${LOGMSG} -lt 8 ]; then #注意[]两边必须有空格
echo “Commit policy: You must write more than 8 chars as comment!” 1>&2
exit 1
fi