通常安装后
当编辑注释时会提示
DAV request failed; it's possible that the reprository's pre-revprop-change hook either faild or is non-existent At least one property change failed; repository is unchanged
经过查找资料后发现,这是因为没有添加hooks
在库里面hooks\pre-revprop-change.tmpl是Unix的例子
(Here is an example hook script, for a Unix /bin/sh interpreter.)
这里就给出windows下的hooks的范例
建立pre-revprop-change.cmd或者pre-revprop-change.bat
@echo off
set repos=%1
set rev=%2
set user=%3
set propname=%4
set action=%5
if /I not '%propname%'=='svn:log' goto ERROR_PROPNAME
if /I not '%action%'=='M' goto ERROR_ACTION
set bIsEmpty=true
for /f "tokens=*" %%g in ('find /V ""') do set bIsEmpty=false
if '%bIsEmpty%'=='true' goto ERROR_EMPTY
goto :eof
:ERROR_EMPTY
echo Empty svn:log properties are not allowed. >&2
goto ERROR_EXIT
:ERROR_PROPNAME
echo Only changes to svn:log revision properties are allowed. >&2
goto ERROR_EXIT
:ERROR_ACTION
echo Only modifications to svn:log revision properties are allowed. >&2
goto ERROR_EXIT
:ERROR_EXIT
exit /b 1
Enjoy it!
转载请注明版权为FalconIA所有