In the hooks directory under the storage directory of the SVN project repository, create a new Post-commit.bat file:
@echo OffSET repos=%1set rev=%2set dir=%repos%/hooksset path=%path%; SET working=e:/www/directory to synchronize SVN update%working%--username user name--password password
Note: The above method must add the bin in the SVN server installation directory to the path (environment variable [path use '; ') Separate]). SVN installs through Setup, and the bin directory is added to the path path by default, and must be manually incremented if installed through a compressed package.
To find out if this script is an error, you can enter it on the cmd command line: D:/svn/hooks/post-commit.bat for testing. The following message appears to indicate that the script executed successfully:
C:\Documents and Settings\administrator>d:/svn/hooks/post-commit.bat
Upgrading ' E:\WWW\APP:
Version 216.
Automatically sync to the Web root after SVN commits