Version Control-SubVersion establishment and integration with Apache Server

Source: Internet
Author: User

In each project, Version Control of source code is indispensable. It is hard to imagine what a project without a good version control will be like. It must be the kind of messy source management. There were two commonly used version control tools, Microsoft's VSS and open-source cvs. Now there is a powerful subversion.

In the past, we used cvs for many projects. After all, it was free of charge. However, the regret of CVS is that it is a little difficult to manage documents, especially when file names or folder names contain Chinese characters, if the encoding of the first byte of some Chinese characters is exactly the same as that of some key characters in CVS, the folder name may be garbled, which I have been troubled by before, later, Microsoft's VSS was used to solve the problem.

VSS Management documentation is good, but because it does not support multiple users simultaneously checkout and merge features, it is inconvenient for development projects, it seems that the VSS included in Visual Studio 2005 can support merge functions. However, if you have never used it, you will not forget to add comments.

Here I will focus on subversion. I have heard of this before, and I have also sent the latest spring source code to checkout from SourceForge. However, I have not studied how to create subversion. Today, we have read some help documents, successfully configured the subversion, and integrated the subversion and Apache server.

First, install Apache server. I installed Apache of version 2.0.59. It is said that other earlier versions of Apache server may run incorrectly, but Apache server of this version should be better. Second, install the subversion. Google will soon be able to find the download of the Subversion Installation File. After installing Apache server and then installing subversion, the httpd. conf configuration file of Apache server will be automatically updated in subversion. Otherwise, we need to manually modify the configuration file as follows.

First, add the following two lines:

LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule dav_svn_module "C:/Program Files/Subversion/bin/mod_dav_svn.so"
LoadModule authz_svn_module "C:/Program Files/Subversion/bin/mod_authz_svn.so"

You only need to remove the original annotator from the first two lines, and manually specify the so file for the next two lines of subVersion.

Add the following section in Apache httpd. conf:

<Location/svn>
DAV svn
SVNParentPath D:/svn
AuthType Basic
AuthName "Subversion repositories"
AuthUserFile D:/passwd
Require valid-user
</Location>

/Svn indicates the http access path, D:/svn specifies the svn storage path, AuthType Basic indicates the Basic authentication, and the authenticated user name and password file is D: /passwd, where only Authenticated Users are allowed to access. The export-c passwd xudl command creates a passwd file in the current directory, and creates a new user named xudl, in the subsequent command prompt, you will be asked to enter the password. After the password is confirmed, a passwd file will be completed.

Copy the passwd file to the D: root directory. Because there is such a configuration in the Location, AuthUserFile D:/passwd, the passwd file is placed in the corresponding Location.

At this time, the server configuration is complete. You have to import a repository to SVN and enter it under the command line.

Svnadmin create/svn/repos, and a repos repository is created. At this time, enter http: // 127.0.0.1/svn/repos in the browser. After you enter the correct username and password, you will see a list of SVN files. At this time, the repository is empty, therefore, no file exists. The following command is used to import the project.

Svn import. file: // svn/repos -- message "Initial repository"

You can then import the current directory to the repository, and then use svn co file: // svn // repos to re-checkout the souce you just added.

After the import, use a browser to access http: // 127.0.0.1/svn/repos. Then you can see what you Just checkin. Since then, our SubVersion configuration has been initially completed.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.