[原创]SVN提交后自动同步到WEB目录,无错版。

为了实现这个,在网上GOOGLE了N多地方,不是中文名有问题,就是其它的什么莫名其妙的错误,哎。。。最后还要解决了,下面将正确的步骤公布,免得大家走弯路。

第一步先要执行

[coolcode]
svn checkout –username=your_username –password=your_passwd http://localhost/svn/union/trunk /var/www/union
[/coolcode]

首先到目标仓库的hook目录下执行 cp post-commit.tmpl   post-commit

然后
vi post-commit   并将里面的所有东西注释掉

接着在post-commit里面添加如下内容

[coolcode]
export LANG=zh_CN.UTF-8
svn update –username=your_username –password=your_passwd http://localhost/svn/union/trunk /var/www/union –no-auth-cache
[/coolcode]

然后保存。
记住以上的东东一个都不能少,要不然你会出现N多问题

转载请注明出处  http://www.cbrother.com/html/1483.html

《[原创]SVN提交后自动同步到WEB目录,无错版。》


发表评论

您的电子邮箱地址不会被公开。

5 + 3 =