Windows SVN hooks implement each commit update to the Web directory

Source: Internet
Author: User
Tags svn update

Objective

Locate the Repository (repositories) folder in the SVN server and locate the Hooks folder in the appropriate project folder. Add a Post-commit file to the folder, and when a commit action occurs (when committed to SVN server) The Post-commit file is executed, where the data is copied,

Steps

1. Locate the SVN server side of a project warehouse directory (in this case, a new test project has been created on the service side):

2. Create a new Post-commit.bat file in the hooks directory with the following contents:

@echo off

SET repos=%1
SET rev=%2
SET Dir=%repos%/hooks
SET path=%path%;
SET Working_copy=e:/myweb//Here is your project path

SVN update%working_copy%--username tianyl--password 111111//Enter SVN user name password

3.web directory must use TORTOISESVN checkout out repositories code

4. There is also a note on the--visual SVN server permissions, otherwise the following error may occur:
Post-commit Hook failed (exit code 1) with output:
svn:E155004:Working copy ' d:/www/test ' Locked
Svn:E200031:sqlite:attempt to write a readonly database
Svn:E200031:sqlite:attempt to write a readonly database
Svn:run ' svn cleanup ' to remove locks (type ' svn help cleanup ' for details)
The reason is that the Visual SVN Server service does not have enough execution permissions to read and write to the specified directory. Workaround, modify visual SVN Server
Simple operation Windown under Run input services.msc find Visual SVN Server service right-click Properties login Panel set desktop interaction or administrator permissions try again

Windows SVN hooks implement each commit update to the Web directory

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.