Synchronizing servers with SVN hooks scripts

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.