SVN is commonly used in team development and is a very convenient version control system.
If you can automatically publish the data on the SVN server to the Web server, it will be the entire project development, testing more convenient. With the SVN hook feature, you can synchronize data on the SVN server to the Web server.
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 is on the same Windows System server as the test Web server, and SVN server uses Apache for Visualsvn,web server. The name of the project is test, 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 filesvisualsvn Serverbinsvn.exe" Update "D:wwwtest"--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 off
Set repos= "%1"
Set txn= "%2"
"C:Program FilesSubversionbinsvn.exe" Update "F:wwwroot"--quiet--username admin--password admin
All right, it's done.