1.找到SVN server對應(yīng)的Repositories目錄,然后點擊需要同步的工程如test,打開test工程下的hooks文件夾,增加post-commit和post-commit-run兩個bat文件
注:(1)post-commit.bat:
call %~dp0post-commit-run.bat %* > %1/hooks/post-commit.log 2>&1
(2)?post-commit-run.bat:
echo on
SET REPOS=%1
SET USER=%2
SET SVN="D:\Program Files (x86)\VisualSVN Server\bin\svn.exe"
SET DIR="www網(wǎng)站目錄\test" ?(call %SVN% update %DIR% --username 填入用戶名 --password 填入用戶密碼 --non-interactive)
用戶名密碼必須是svn登陸的賬戶
2.設(shè)置windows服務(wù)中visualSVN server中的登陸名為管理員賬戶,重啟visualSVN server服務(wù)
3.網(wǎng)站目錄下必須存在通過客戶端遷出地test的工程