#!/bin/sh
repos="$1"
txn="$2"
res="ok"
# make sure that the log message contains some text.
svnlook=/usr/local/svn/bin/svnlook
$svnlook log -t "$txn" "$repos" | egrep "[^[:space:]]+" >/dev/null || unset res
if [ "$res" != "ok" ]
then
echo "you must input some comments for you commit" >&2
exit 1
fi
# all checks passed, so allow the commit.
exit 0
来源:oschina
链接:https://my.oschina.net/u/4368242/blog/4345601