if [ "$ACTION" = "M" -a "$PROPNAME" = "svn:log" ]; then exit 0; fi
echo "Changing revision properties other than svn:log is prohibited" >&2
exit 1
重写太麻烦了,在网找到了对应的bat脚本pre-revprop-change.bat,将这个脚本放到hooks文件夹下,就可以了。
setlocal
set REPOS=%1
set REV=%2
set USER=%3
set PROPNAME=%4
set ACTION=%5
if not "%ACTION%"=="M" goto refuse
if not "%PROPNAME%"=="svn:log" goto refuse
goto OK
:refuse
echo Cann't set %PROPNAME%/%ACTION%, only svn:log is allowed 1>&2
endlocal
exit 1
:OK
endlocal
exit 0
关于设置hook脚本,如果你觉得复制脚本到hooks文件夹挺麻烦,在VisualSVN server上还有更简单的办法,打开VisualSVN Server控制台界面,如下图点开一个Repositories的Properties\Hooks界面