svn允许修改提交记录

set repos=%1
set rev=%2
set user=%3
set propname=%4
set action=%5
::将此处修改为你自己的svnlook路径
set svnlook=“C:\Program Files (x86)\VisualSVN Server\bin\svnlook.exe”

for /f “usebackq” %%k in (%svnlook% author %repos% -r %rev%) do @set var=%%k

set rightUser=1
::if “%3” == “%superUser%” set rightUser=1
::if “%3” == “%var%” set rightUser=1

::if %rightUser% == 0 goto ERROR_USER

goto :SUCCESS_EXIT

:ERROR_USER
echo 只允许用户修改自己的日志 >&2
goto ERROR_EXIT

:ERROR_EXIT
exit 1

:SUCCESS_EXIT
exit 0

你可能感兴趣的:(杂类,svn)