SVN configuration in Windows

Source: Internet
Author: User
Tags version control system tortoisesvn

Subversion, SVN for short, is an open-source version control system. Amount. Gray is often easy to use.

Preparations:
Download:
Server program download: http://subversion.tigris.org/getting.html#binary-packages

Windows Common Client tortoisesvn: http://tortoisesvn.net/downloads

Okay. In Windows, the installation is complete next step (restart is required after the client is installed ). Configure a version library.

1: Create a version library. You can right-click any disk and choose create.


Of course, you can also use the command line

2: import the project to the version Library
Now there is a project (assuming test). I create a folder test on drive D, and then create the trunk, branches, tags folder and trunk folder to store the project code and the main line, branches stores code branches and tags stores tags. Of course, that's just a suggestion. The suggestion is good. You can also directly place the code in test. Brother is.
Import project, right-click the test folder to import

You can also run the following command to import a project:
SVN Import address

OK. Now you can checkout it on the local machine.

However, checkout is still an absolute local path and cannot be released to the network or SVN address. Therefore, use the svnserve option to specify a path.
Svnserve-D-r d:/svntest

Now you can use SVN: // 127.0.0.1/trunk for checkout.

3. Make svnserve a Windows Service
After the preceding step, the command line window can be started until it is disabled. Currently, the system is windows. Therefore, it is more convenient to make svnserve a service. Use the command line tool SC. EXE to define a new service.
C: \> SC create svntest
Binpath = "\" C: \ Program Files \ SVN \ bin \ svnserve.exe \ "-service-R c: \ repos"
Displayname = "Subversion server"
Depend = TCPIP
Start = auto

Note the quotation marks and spaces as shown in the red coil in the figure. A space is missing on the red line.

4. Set the user name and password and Access Permissions
Now you can access it on the network. The other computer chekout has a copy of SVN: // ip address/trunk. However, you must set the user name and permissions for different users. Find the conf folder under the version library folder you created, which contains three files: authz passwd svnserve. conf.

The final settings of the authz file are as follows:
[/]
Tan = RW
* = R
[/Trunk]
LZC = RW
Xiaoliu = RW
* = R
[/] Indicates that the following user names can operate on all projects in the database of this version. [/trunk] indicates that the following users can only perform read and write operations on the trunk project: tan users can read and write all the projects in this version library, while other users can only read and write, LZC and xiaoliu users can only read and write the Trunk Project in the version library. Other users can only read and write the project, and Tan users cannot write the Delphi project, because * = R is used at the end, the parent permission is cut off, and * = r cannot be omitted. If * = is set, the project cannot be read, that is, the files under this project cannot be seen when you open the version library.

The final settings of the passwd (set user name and password) file are as follows:
[Users]
LZC = 1, 123
Xiaoliu = 123
Cc = 123
The user name is on the left and the password is on the right.

Set the format of svnserve. conf. Find 20 rows # password-DB = passwd 27 rows # authz-DB = authz to remove the comment above.
Change rows 12 and 13
Anon-access = none
Auth-access = write

Okay. After the settings are complete, you can now checkout commit update on the client. How to use the next decomposition.

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.