########################################
REPOS="$1"
TXN="$2"
min=10
comment_entered=`svnlook log -t $TXN $REPOS`
comment_lenght=`echo $comment_entered | wc -c | tr -d ' '`
if [ "$comment_lenght" -lt "$min" ]; then
echo "" 1>&2
echo "*** Your commit has been blocked because you did not give any log message or your log message was less than 10 caracters." 1>&2
echo "Please write a log message describing the purpose of your changes and then try committing again." 1>&2
exit 1
else
exit 0
fi
##################################
You can copy paste above content in /svnroot/yourepo/hook/pre-commit . Good thing is that you don;t even need to make any changes in this script.
Enjoy
Amit ......
testing commenting for post.
ReplyDelete