1. TortoiseSVN
For the installation of TortoiseSVN, see the installation of the blog TortoiseSVN and its simple use.
2. VisualSVN Server
The installation of VISUALSVN server is described in the blog visualsvn-server Server Building.
or refer to VISUALSVN server configuration and Usage (RPM).
It is also necessary to note that the VISUALSVN Server in the tag branch trunk usage, the official does not give strict restrictions, can refer to the following 2 blog posts:
An explanation of trunk,branches,tags usage in SVN
SVN tag Branch trunk usage in detail
3. Implementing Web Site Synchronization
Before doing this, first refer to reading Windows SVN Server synchronization with the Web site.
In the Web development process, after the SVN client commits the modification to the server, it is not possible to see the actual directory structure of the file in the default code warehouse (repositories), for example, for the development project keys, the locally seen file directory.
The file directory that you see in the server-side repositories file is as follows.
It is not an actual project document, but a version control related file. In order to obtain the same document directory as the client on the server side, you need to specify a path on the server and TortoiseSVN checkout. The same file was also obtained on the server side.
For personal development, in order to implement real-time preview of the changes after the code is submitted, you need to be able to automatically checkout on the server side, based on VISUALSVN servers and. bat files, as follows:
1. Take the project keys as an example, copy the Post-commit.tmpl template under hooks and modify the suffix named. bat.
2. Change the Post-commit.bat Chinese text to
" C:\Program files\visualsvn Server\bin\svn.exe " " C:\websites\keys " " UserName " " Password "
where "C:\Program files\visualsvn server\bin\svn.exe" is the path to the executable svn.exe,"c \ Websites\keys"is the synchronization destination path.
Note: The double quotation marks on the user name and password text cannot be omitted.
3. The most critical step: The problem of SVN server permissions;
Otherwise, you may receive the following error: 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 to try again.
4. At this point, if the client modifies the file and submits it to the server, the files under the corresponding Site directory are also updated synchronously.
Build SVN servers and synchronize Web sites with TortoiseSVN and VISUALSVN server under the Windows platform