Ideas:
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 and the data is replicated in the file.
Instance:
Environment: SVN server uses Apache for Visualsvn,web server on the same Windows System server as the test Web server. The project name is test and the client uses TORTOISESVN.
First in the Apache WWW directory to create a folder, to checkout, enter the need for user name and password, the test item to be removed to the folder.
Locate the repositories directory for the SVN server and create the Post-commit.bat in the Repositories/test/hooks folder where you write the command:
"C:\Program files\visualsvn server\bin\svn.exe" Update "D:\www\test"--quiet--username name--password pwd
(That is, to execute the SVN update command, replace the user name and password yourself)
Can also be written like this
@echo OffSET repos=%1set user=%2set svn= "E:/program files/visualsvn server/bin/svn.exe" SET dir= "e:/wamp2/www" (call% svn% update%dir%--username izaodao--password Izaodao--non-interactive)
Done.
Note:
1.web directory must use TORTOISESVN checkout out repositories code
2.
-username Izaodao--password Izaodao
Izaodao Replace with username and password for login svn
Error exclusions that you may encounter in use:
1.ERROR:SVN: Parsing "D:\www\test" error, or svn:E020024:Error resolving case of ' D:\www\test ', it is possible because the target file name has been added "\"
2. "D:\www\test" or skipped ' d:\www\test ', it is possible because there is no step to submit the update processing file, the. bat file mentioned above, Svn.exe do not know the destination folder
3. Working copy ' D:\www\test ' is too old, you may need to rearrange the destination folder with the Sven.exe Upgrade command or reinstall a higher client version at least 2.6
4. There is also a problem--visual the permissions of SVN server, 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 Win+r Run services.msc find Visual SVN Server service right-click Properties login Panel set desktop interaction or administrator permissions try again
Source Address: http://www.cnblogs.com/xiezhengcai/archive/2013/11/27/3445457.html
Reference: http://www.2cto.com/os/201303/192225.html
Http://www.php100.com/html/webkaifa/PHP/PHPyingyong/2009/0709/3066.html
Http://blog.sina.com.cn/s/blog_418bef9d0100rqmx.html