svn pre commit

windows下的必须要用.bat文件,pre-commit.bat

==================================================

@echo off

set SVN_BINDIR=d:/Apps/Subversion/bin
setlocal
set REPOS=%1
set TXN=%2

REM echo %REPOS% >&2
REM echo %TXN% >&2

svnlook.exe log %REPOS% -t %TXN% | findstr "........" >&2

if %errorlevel% gtr 0 goto :err_action
exit 0

:err_action
echo "less then 8 bytes" >&2
goto :err_exit
:err_exit
exit 1

:success
exit 0
==================================================

posted @ 2017-08-09 15:54  zxyblog  阅读(633)  评论(1编辑  收藏  举报