Using SVN for version control _win server

Source: Internet
Author: User
Tags subversion download svn tortoisesvn tortoisesvn download

I use the system is: Microsoft Windows XP SP2

First: Download software

There are two software downloads that need to be downloaded:
Subversion and TortoiseSVN
Subversion Download Address:http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91
TortoiseSVN Download Address:http://tortoisesvn.net/downloads

(Some documents say the prerequisite software and Apache, but this is mostly the older documents mentioned that, as the software updates, there is no need to install Apache, the installation of Apache is for SVN to do more things, such as HTTP access, etc.). )

The system needs to be restarted after the software is installed.

Second, establish the service and root directory creation

Build SVN root directory: For example, set up folder Svnroot in e-disk.

The SVN service is then set up: (The SVN service is set up as a Windows service)

Typing at the command line: SC create svn1.5 binpath= "\"C:\Program files\subversion\bin\svnserve.exe\ "--service--root \"e:\ Svnroot\ "" "Depend= Tcpip start= Auto
(The first red part is the installation location for subversion, the second red is the SVN root directory you just created, note: there must be no spaces before the equals sign in the command line, and a space after the equals sign)

After running Windows to open the service window check, if there is such a service svn1.5, the establishment is successful, the initial establishment may have to manually start (otherwise restart the system can also, of course, there is no need to reboot the system)

Third: the establishment and configuration of specific projects.

This assumes that we have a project demoproject need to be managed with SVN.

Create a new folder Demoproject under E:\SVNRoot. Into the demoproject, the mouse right click in the blank, select TortoiseSVN, and then choose Create Repository here. After the operation, you can see that there are more files and folders inside the empty folder.

Now you can test the above steps are correct, in the F disk to create Demoproject (development project folder), into the newly created folder, the right button in the blank, select Svncheckout,url repository fill in svn://localhost/ Demoproject, other defaults. Click OK (if the window action has a display completed, that means the operation is successful).

This can be accessed, but not done, we need to read and write permissions to the profile. Then we entered the E:\SVNRoot\DemoProject\conf.
There are three files inside. By default, almost all of the code is used with the # annotation.

Next, we'll modify the three files to configure SVN authentication and authorization. (Please distinguish between authentication and authorization)

The first is the svnserve.conf file.
# anon-access = Read to change this line to anon-access = None, which indicates that anonymous access is prohibited (note: Anon cannot have spaces before)
# password-db = passwd Removes the comment in front of the line and deletes the space to verify that the user is using the passwd file.
# authz-db = Authz Removes the comment in front of this line and deletes the space, indicating that the Authz file is authorized to use.

Then modify the passwd file, part of the file content:
[Users]
# Harry = Harryssecret
# sally = Sallyssecret

I would like to see the contents of this file should be aware of the role, here is to configure SVN username and password, where Harry is the user name, the sign is followed by the user password, Sally is another user. Of course, both lines of code are annotated. You can delete annotations to enable them, or you can add your own line, such as:
Kate = 123456
Here is the password is clear, if your project security requirements are high, you can use encrypted password, configure more trouble, here do not say. There is also a user name can be between the space, username and password of the legal characters, and so on, I did not do the test.


Last Configuration Authz
The first attribute node is aliases, alias, and does not know where the function is, it is estimated that many users with equal permissions are merged into one name. I haven't made any changes here.

The second attribute node, groups, is a good idea to merge users with the same permissions into a group so that the following configuration authorization is simpler.

The following attribute nodes are directory authorization nodes.
[/foo/bar] represents the following settings for authorization under the/foo/bar directory. The following authorization format is: User name | Group name = RW | R,R is the abbreviation for read, which indicates that there is reading permission, W is the abbreviation for write, which indicates writable permission, and RW represents readable and writable.

If you are configuring the use of [/] in the root directory.


After the configuration completes, enters F:/demoproject again, in the blank place right mouse button, chooses Svnupdate, then will pop up the window request us to enter the user name and the password, enters the user name and the password which is configured in the passwd file to be able to visit.

Such a project is configured to complete. Then you can use it. The specific update, commit, and other operations use will not say.

Two tips:

1.
The lazy operation we are accustomed to is the whole project commit before work, but the fact is that there is no need to put all the documents of the whole project to SVN management, and even some files submitted after the trouble greatly. In the case of the Xxx.user file under VS solution, this submission caused a conflict of almost 100%.
The solution is to set the global ignore pattern value to "*/bin */obj *.bak *.*scc *.user setting *.suo *.gpstate *.webinfo Bin obj * in the TORTOISESVN. . dll *.pdb *.exe thumbs.db */testresults ", where the pattern for the example is primarily for developers who use Visual Studio.

2.
Check the setting in TortoiseSVN for "_SVN" instead of ". SVN" directories, at some point (I'm not sure that's the time). SVN will make an error in the Windows system.


Reference articles:

Http://www.blogjava.net/zpuser/archive/2008/06/08/206654.html

Setting_up_a_subversion_server_under_windows

November 25 Update:

If you can't read the above article, it is recommended that you use Visual configuration software to configure Subversion services. This article is provided by the enthusiastic comments of this article:

Http://www.cnblogs.com/ttzhang/archive/2008/11/06/1325940.html

(I read this article to configure subversion and then use the VISUALSVN server to configure it, which is really simple!) )

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.