svn自动更新web服务器

时间:2023-04-30 23:03:56

1、安装VisualSVN-Server-2.7.5.msi和TortoiseSVN-1.8.6.25419-win32

安装完创建test库到E:\Repositories\test\目录下

2、自动更新

在库目录E:\Repositories\test\hooks下建post-commit.bat

在E:\盘建立test文件夹和testsvn文件夹,分别在两个文件夹下做checkout

@echo off
SET REPOS=%1
SET REV=%2
SET DIR=%REPOS%/hooks
SET PATH=%PATH%;
SET WORKING_COPY=e:\testsvn
"C:\Program Files\VisualSVN Server\bin\svn.exe" update %WORKING_COPY% --username test --password test 3、设置svn服务为

svn自动更新web服务器

4、重启svn服务,在test下添加文件到svn,在testsvn下查看是否同步数据。

5、导出方法:post-commit.bat

"C:\Program Files\VisualSVN Server\bin\svn.exe" update http://FUNG-20120803TQ:81/svn/test/ e:/testsvn --force --username test --password test --no-auth-cache