SVN automatic update Solution

Source: Internet
Author: User

 

A visual SVN server is built on Windows 03 server. If you want to set any modifications submitted to SVN, they will be synchronously updated to the web directory on the local server.

Based on the reference of various versions on the Internet, the built-in hook function of SVN is basically used for implementation:

Create a post-commit.bat file in the hooks directory of the svn project version's storage directory:

@ Echo off

Set repos = % 1
Set REV = % 2

Set dir = % repos %/hooks
Set Path = % PATH %;

Set working_copy = D:/websites/WWW
SVN update % working_copy % -- username your_name -- password your_pwd

Note:

1. You need to add the bin directory of the svn server to the path. After the directory is added, it does not restart. The path value takes effect immediately on the command line, but the svn server cannot be found. The prompt is always displayed:

Warning: Post-commit hook failed (exit code 1) with output:
'Svn 'is not an internal or external command or can be runProgramOr batch files.

2. You need to set the svn Service's permission on the file desktop system. Otherwise, the following error occurs:

Select a local system account and select allow services to interact with the desktop.

Over

Org: http://blog.donews.com/me1105/archive/2010/12/05/82.aspx

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.