How to configure and use VISUALSVN server and TORTOISESVN clients

Source: Internet
Author: User
Tags svn update tortoisesvn

Http://www.cnblogs.com/beautifulFuture/archive/2014/07/01/3818211.html

Learn more about code management tools in the near future, first learn about SVN and TORTOISESVN, and summarize the following:

The resources are as follows:

TORTOISESVN official website
Http://tortoisesvn.net/index.zh.html

SVN online Book

http://svnbook.red-bean.com/

Svnserver Download Path
Http://subversion.apache.org/packages.html

Baidu Space is a good article

Http://wenku.baidu.com/link?url= Umziowhylzimk6s5oirkxuv1cgwft1cw1tolr1oawsui7kdl5bpnlaiuqwcl8nyhhcm7iybtuimhvp7qsb_8o0pcqfav0w07xkmvutkxros

Small bet

If you use Eclipse to connect to SVN, then TORTOISESVN is not needed, TORTOISESVN is only used alone and cannot be mixed with Eclipse's SVN submissions.

If you want to uninstall visualsvn, you will need to stop the service in the Windows service before uninstalling it from the Control Panel, or you cannot uninstall it.

I. Configuration and usage of VISUALSVN server "server Side"

Version: Visualsvn-server-2.7.7.msi

The interface after installation is complete:

OK, let me add a code base "Repository" such as:

Create a new code base, as shown in, and enter the code base name in the text box shown:

Note: If the checkbox is checked, the trunk, branches, tags Three subdirectories are created below the code base Startkit, and if unchecked, only empty code library Startkit is created.

Click the OK button and the code base is created successfully.

After creating the code base, nothing is inside. I'll show you how to move into the source code in the second part of this tutorial.

Below, we start the security settings and right-click on the users on the left:

Enter the information above, click OK, we will create a user. According to the above procedure, add the user Developer1, Tester1, manager1 Separately, OK, we start to add these users to the project we just created:

Click on the "Add ..." button in the Select the user we just added, click the OK button:

Note: You may have noticed the groups, yes, you can also create a group, add users to the groups, and then authorize the group, the operation is relatively simple, this is skipped.

As shown, the user "or group" is authorized separately:

Click on the "OK" button, the above users have access to the Startkit code library different permissions.

Because user starter is a newcomer to the team and does not want him to submit new code to the codebase, he can only read the code in the code base and cannot commit the code. Tester1 is a tester and is not responsible for code writing, so it is also read-only permission. Developer1 and Manager1 are developers and project managers who naturally have read and write permissions.

In the actual project development process, developer and tester often cannot have only one person, this time uses the group to authorize more convenient, this everybody can practice for oneself.

Second, the basic use method of TOTOISESVN

Version: Tortoisesvn-1.8.7.25475-win32-svn-1.8.9.msi

2.1. Check in source code to SVN server

If we create a project in the folder Startkit using Visual Studio, we need to check the source code of the project into the codebase on the SVN server, first right click on the Startkit folder, and the context menu is as follows:

Figure 2-2-1

Click Import, pop up the form below, where http://zt.net.henu.edu.cn is the server name, SVN is the root of the code warehouse, and Startkit is a code base we added in the previous tutorial:

Note: The checkbox in the lower left corner is not useful when you check in the source code for the first time, but it is helpful when you commit the code later.

Figure 2-2-2

Click the OK button and the following form will pop up asking for your credentials:

Figure 2-2-3

Enter your username and password in the form above and click the OK button:

Figure 2-2-4

As shown, well, the source code has been successfully checked into the SVN server. This is when team members can move out of the source code on the SVN server to their machines.

2.2, check out the source code to the machine

To create a folder on this machine Startkit, right click on Checkout, pop up the form like:

Figure 2-2-5

Enter the address of the codebase in SVN server in the text box under URL of Repository: Other default, click the OK button to start checking out the source code.

Description: In the checkout Depth, there are 4 options, namely to move out all, check out only the next level of subdirectories and files, check out only the files, check out only empty items, the default is the first item. In the example above, we can also use the Web to access the code base and enter http://zt.net.henu.edu.cn/svn/StartKit/in the browser.

A dialog box will also pop up asking for a user name and password that can be verified to explore the contents of the code base.

Get! The source code has been successfully checked out to the Startkit directory you just created.

Open the Startkit directory and you can see the folder structure as follows:

Figure 2-2-5

Once you have made any changes to the file or folder, the opportunity to display the picture in the file or folder changes. I have modified two of these files:

Figure 2-2-7

Let's look at the pictures of the different states:

Figure 2-2-8

We already know how to check in the source code to the SVN server, how to check out the code from the server to the machine, but also a simple understanding of the different states of the corresponding pattern.

2.3. Submit the modified file to the SVN server

In Figure 2-2-7 above, I modified the two files in the model file ImageInfo.cs and NewsInfo.cs, and the following shows how to commit to the SVN server.

Note: When submitting the source code to the server, be sure to ensure that the native code is the latest version, otherwise the submission may fail or cause a version conflict.

Right-click on the Model folder or in the blank space under Model file and click on SVN Commit ... The following form pops up:

Figure 2-2-9

Click the OK button to eject the form as follows:

Figure 2-2-10

2.4. Add new files to SVN server

We add a new class file under the model file UserInfo.cs, right click on the blank in the model file, click on the SVN commit ..., and the above-mentioned commit the modified file to the SVN server, it is OK.

Alternatively, you can right-click on the file UserInfo.cs and click Tortoisesvn=>>add to eject the form as follows:

Figure 2-2-11

Select the UserInfo.cs file and click the OK button so that the file is not submitted to the SVN server, just mark the file as a file in the source library and set its status to the modified state. After that, we'll have to commit the file again, so that it can actually be submitted to the code base on the SVN server.

The above is to add a file, in fact, the steps to add a folder is the same, this is not said.

2.5. Update native code consistent with the latest version on SVN server

This is also very simple, as long as the need to update the folder right-click or in the blank space under the file right click, click on SVN update, you can.

Note: The update operation may fail due to a version conflict, which can be resolved by using merge "merge" or other methods, or it may fail because of locking "Get lock", which requires unlocking "release lock" first.

2.6. Rename the file or folder and submit the changes to the SVN server

Just right-click on the file or folder that needs to be renamed, click Tortisesvn=>>rename ..., enter the new name in the popup form, and click the OK button. This method is not renamed directly, but instead marks the name of the file or folder as a renamed name, and it requires that we use SVN commit to commit to the SVN server before actually renaming it.

2.7. Delete files or folders and submit the changes to the SVN server

The simplest is that you delete the file or folder directly and then use SVN commit to commit the update to the SVN server. Another way is to click on the file or folder you want to delete the right button =>>tortoisesvn=>>delete Delete, this method is not directly deleted, but the status of the file or folder is deleted, we also need to use SVN Commit to the SVN server before it is actually deleted.

Description: In fact, since you moved the source code into the SVN server, each version of the data and files, even if you have deleted, you can always move out.

How to configure and use VISUALSVN server and TORTOISESVN clients

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.