Go to the hooks directory of the svn project.
Create a post-commit file. The content is as follows:
#===================================================== ====================================
Export lang = zh_CN.UTF-8
Web =/www/vhost
SVN update $ Web -- username user -- password passwd -- no-auth-Cache
#===================================================== ====================================
You must specify the character set.
The user name and password are required to run SVN update and do not cache user authentication tokens.
Export lang = zh_CN.UTF-8
-- Username user -- password passwd -- no-auth-Cache
Otherwise, an error is reported when SVN commit:
Error: Merge of '...': 200 OK ........
Assume that the external access domain name of the server is http://yemaosheng.com/website file stored in/var/www/html/ye/
Modify the post-commit file in the svn Library
Operations include:
CD/var/www/SVN/repos/hooks/
Cppost-commit.tmpl post-commit
Chown Apache: Apache post-commit
Chmod A + X Post-commit
VI post-commit
#! /Bin/sh
Repos = "$1 ″
REV = "$2 ″
SVN update/var/www/html/Ye-username svnuser1-Password 123456
PS: the above operations should be true, but I tested on my fc8 server no effect, it is estimated that the problem of UTF-8.
I had to use crontab to run sh every 5 minutes instead.
#! /Bin/sh
Export lang = zh_CN.UTF-8 # Note: This line hurt me a few hours
SVN update/var/www/html/Ye-username root-Password 123456
If skipped is prompted, you must first check a working version to this web directory.
For example:
SVN Co file: // home/SVN/xdadmin file: // var/www/xdadmin
Go to the hooks directory of the svn project.
Create a post-commit file. The content is as follows:
#===================================================== ====================================
Export lang = zh_CN.UTF-8
Web =/www/vhost
SVN update $ Web -- username user -- password passwd -- no-auth-Cache
#===================================================== ====================================
You must specify the character set.
The user name and password are required to run SVN update and do not cache user authentication tokens.
Export lang = zh_CN.UTF-8
-- Username user -- password passwd -- no-auth-Cache
Otherwise, an error is reported when SVN commit:
Error: Merge of '...': 200 OK ........
Assume that the external access domain name of the server is http://yemaosheng.com/website file stored in/var/www/html/ye/
Modify the post-commit file in the svn Library
Operations include:
CD/var/www/SVN/repos/hooks/
Cppost-commit.tmpl post-commit
Chown Apache: Apache post-commit
Chmod A + X Post-commit
VI post-commit
#! /Bin/sh
Repos = "$1 ″
REV = "$2 ″
SVN update/var/www/html/Ye-username svnuser1-Password 123456
PS: the above operations should be true, but I tested on my fc8 server no effect, it is estimated that the problem of UTF-8.
I had to use crontab to run sh every 5 minutes instead.
#! /Bin/sh
Export lang = zh_CN.UTF-8 # Note: This line hurt me a few hours
SVN update/var/www/html/Ye-username root-Password 123456
If skipped is prompted, you must first check a working version to this web directory.
For example:
SVN Co file: // home/SVN/xdadmin file: // var/www/xdadmin