svn自动同步到web目录的设置方法

背景

      服务器(Windows Server  2008系统)上搭建VisualSVN Server,本地svn提交代码修改后,需要自动同步到服务器端的代码仓库。


设置

      思路: svn的hooks目录有触发功能,有一个post-commit.bat文件(需要新建),意为“提交后执行”,通过这个功能就可以将提交代码后要做的事写到里面来执行。

      操作:在代码库的hooks目录里新建post-commit.bat,贴入以下代码:

      "svn.exe path" update "working path" --quiet --username --password

      例如:

      "C:\Program Files (x86)\VisualSVN Server\bin\svn.exe" update "D:\xampps\htdocs\iqiyi\HuckleberryFriend" --quiet --username xxxxxx --password xxxxxx

猜你喜欢

转载自blog.csdn.net/gaofei880219/article/details/79085213