Use SVN for source code management (below)

Source: Internet
Author: User
Tags svn client tortoisesvn

As an excellent open-source version control system, subversion is not only used with source code version control, but can manage any files. In front (Use SVN for source code management (I)We have set up the version control environment using SVN. Now we can learn how to use SVN for version control.

 

Reading directory:

1. SVN Server Configuration

1.1 create a version Library

1.2 create a user

1.3 Set User Permissions

2. SVN client usage

2.1 import source code to the svn Server

2.1.1 directly import source code to the svn server through tortoisesvn

2.1.2 use visualsvn to import source code in Visual Studio

2.2 export source code from the svn Server

2.2.1 use tortoisesvn to export source code

2.2.2 use visualsvn to export source code

2.3 submit, update, and compare code

1. SVN Server Configuration

In team development, the source code version control tool is one of the most important tools. It is used to track and maintain the source code, create branches for the project, manage the source code in a unified manner, and perform collaborative development. The main steps for configuring the svn server are: Create a version library, create a user, and set user permissions. The following operations are performed on subversion using the visual SVN server.

 

1.1 create a version Library

Run visualsvn server, select "repositories", right-click, select "create new repository", and enter the name:

 

1.2 create a user

Select "user", right-click, select "create user...", and enter the user name and password.

 

1.3 Set User Permissions

You can set user access permissions for the entire source code repository, or Configure permissions for a single specific source code repository (similar to setting user permissions for the entire source code repository). The procedure is as follows:

1. Select the source code repository of the root directory: repositories, right-click and select "properties..." To Set "everyone" access permission to "no access" (inaccessible)

 

2. Select "add..." to add users to the source code repository.

3. Assign permissions to users added to the source code repository

 

2. SVN client usage

We can directly use tortoisesvnSource codeImport to the svn server. You can also directly add the project to the svn server in Visual Studio through visual SVN. When the server has the source code, we can use these client tools to manage the source code.Code.

 

2.1 import source code to the svn Server

2.1.1 directly import source code to the svn server through tortoisesvn

First, select the folder where the file to be imported to the svn server is located, right-click it, and select "tortoisesvn" --> "import"

Select the address of the svn server to be imported, select the address of the database created earlier, and select the "trunk" (trunk) Branch.

Import completed:

 

2.1.2 use visualsvn to import source code in Visual Studio

Use Visual Studio to open the solution, select the solution, right-click "add solution to subversion...", and then click "Next"

Import to existing database

Select the branch to import to the database

Select "import"

Right-click solution and select "commit..." to submit the entire solution file to the svn server.

Select "OK"

 

2.2 export source code from the svn Server

2.2.1 use tortoisesvn to export source code

Right-click the folder that receives the svn Server Import and select "SVN check out"

Enter the address for exporting the Server Source Code

 

2.2.2 use visualsvn to export files

Open Visual Studio and select the visual SVN menu.

Select the address in the svn server where the exported file is located.

 

2.3 migration and Export Code

You can use tortoisesvn to directly right-click the files exported from the svn server to update and submit the files:

 

You can also use visual Svn in Visual Studio to update, submit, and compare objects:

You can select "show differences" to compare local files with SVN server files:

 

References & further reading

Http://tortoisesvn.net/support.zh.html

 

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.