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