The internal test server concurrently works as an SVN server, so the SVN hooks Post-commit script is configured to automatically complete the test server update after the team member has successfully submitted the file.
The steps are as follows:
1. Cd/svnroot/hooks
2. CP Post-commit.tmpl Post-commit
3. Modify the contents of the Post-commit to:
#!/bin/sh
Svn=/usr/bin/svn
web=/var/web/
$SVN up--username server--password 123456 $WEB
Where/var/web is the location of the test server DocumentRoot,
SVN checkout Svn://192.168.1.1/web/var/web
command to check out.
4. Modify permissions for Post-commit
chmod 755 Post-commit
Restart SVN, in red had E5, no success, Google, the original is a coding problem, add an export statement, the file content is:
#!/bin/sh
Export LANG = en_US. UTF-8
Svn=/usr/bin/svn
web=/var/web/
$SVN up--username server--password 123456 $WEB
Success
Server hardware upgrade, to use Ubuntu, all steps one still its old, failure, baffled its solution.
Add a statement:
WhoAmI >/var/web/a.txt
The discovery is performed with the root account (this is probably because I did not configure SVN as Apache mode, directly with svn://access). Check out using the default account:
sudo svn checkout Svn://192.168.1.1/web/var/web
No root account information is stored.
Su Root
SVN up/var/web
Follow the instructions.
Submit the file again to view the test server file version successfully.
Synchronizing servers with SVN hooks scripts