REM switch Svn Path
Set USER=username
Set PASS=password
Rem cd Svn Local path
cd c:\
svn revert -R .
IF %ERRORLEVEL% NEQ 0 GOTO SVNFAIL
svn switch https://*\ -r head --username %USER% --password %PASS% --non-interactive
IF %ERRORLEVEL% NEQ 0 GOTO SVNFAIL
svn info >> C:\Svn.TXT
IF %ERRORLEVEL% NEQ 0 GOTO SVNFAIL
REM Check out
cd c:\local svn path
RD /s /q .\local folder
IF %ERRORLEVEL% NEQ 0 GOTO SVNFAIL
svn checkout https://*/trunk/ c:\Local Floder\ -r head --username %USER% --password %PASS% --non-interactive
IF %ERRORLEVEL% NEQ 0 GOTO SVNFAIL
REM update
IF %ERRORLEVEL% NEQ 0 GOTO SVNFAIL
svn update -r head --username %USER% --password %PASS% --non-interactive
IF %ERRORLEVEL% NEQ 0 GOTO SVNFAIL
pause
exit
:SVNFAIL
echo "SVN COMMAND FAILED"
pause
阅读(1413) | 评论(0) | 转发(0) |