SVN installation configuration and usage

Source: Internet
Author: User
Tags svn svn update tortoisesvn


1, the selected server installation package: Visualsvn-server-2.1.3.msi,

2. Client Installation package: Tortoisesvn-1.6.2.16344-win32-svn-1.6.2.msi

First, the server installation:

Note: Location: For the installation file location, repositories: The location of the managed code warehouse, if the checkbox in front of the use secure connection is selected, the secure connection "https", where the port is 433/8433 available , if checkbox is not selected, default port 80/81/8080, identity authentication option subversion.

Second, the client installs

Click Finish installation.

Configuration and use of service-side

To add a code base:

Enter the name of the code base in the text box

The check box above is not selected to create an empty code base, and if selected, three subdirectories will be created

After the code base is created, the contents are empty and a brief description of how to move into the source code

Let's start with security settings and select Create User on the left of the users

Then add the user you created to the project you just created, select the project you just created, and right-click the properties ...

Click Add ...

Select users to create, click OK

Permissions says select User rights, there are four choices

1. Inherit from parent

2. No access is not allowed

3. read-only access

4, Read/write can read and write

Click OK

Four, the client's basic use method

1. Check in source code to SVN server

Suppose we use Visual Studio to create a project in the folder Setup, we will check the source code of this project into the repository on SVN server, first right click on the Setup folder, right-click the menu below:

Click Import ...

Where http://192.168.0.101/is the IP address of the server, SVN is the root of the Code warehouse, project is the code base we added, the checkbox in the lower right corner is not used when it is first added, then you can choose to ignore the file when you check in, click OK. Eject the form below to require credentials

If you select the Save outhentication check box, you can save the input voucher.

Enter the username and password above and click OK.

As above, the source code has been checked into the SVN server, let's look at whether there is a check-in source on the SVN server

3, check out the source code to the machine

Create a folder on this machine setup, right click on the SVN Checkout ... Pop up the following form

In the previous figure, the text box under URL of Repository: Enter the address of the code base in SVN server, other defaults, click the OK button and start checking out the source code.

Description: Checkout Depth in the figure above, there are four options, check out all, check out only the next level of subdirectories and files, only check out the file, check out only empty items, default is the first item.

Open the Setup directory and you can see the following folder structure:

Once you have made any changes to the file or folder, the display picture of the file or folder changes. Two files are modified below:

Modified for files under Esupermap.lic and config folders

Take a look at the corresponding pictures in different states

4, submit the modified file to the SVN server

I modified the folder under Electric_inspection, right click on electric_inspection Select SVN Commit ...

Click OK to pop up the following dialog box

5. Add new files to SVN server

We add Esupermap.lic in Electric_inspection, click the right button in the blank space under Electric_inspection file, click SvN commit ..., just like the file submitted to the SVN server mentioned above, it's OK, In addition, you can right-click on the file esupermap.lic, click TortoiseSVN, this file is not submitted to the SVN server, just mark the file as a file in the source code base and set its status to the modified state. After that, we're going to have to commit this file again before we can actually commit it to the code base on the SVN server. The same is true for adding folders.

6, update the native code and SVN server on the latest version of the same

Just click on the right button in the folder that needs to be updated, or click the right button in the blank space under the file, and click SVN Update.

Note: The update operation may fail because of a version conflict, either by merging "merge" or another workaround, or by locking "get lock", which requires unlocking "release lock" first.

7. Rename the file or folder and submit the modifications to the SVN server

Just right-click on the file or folder you want to rename, click Tortisesvn=>>rename ...,

Enter a new name in the form that pops up. This method is not directly renamed, but rather the name of the file or folder is marked with the name renamed, and we need to use SVN commit to submit to the SVN server.

8, delete files or folders, and submit the changes to the SVN server

The simplest is to delete the file or folder directly, and then use SVN commit to update to the SVN server. Another method is to delete the file or folder you want to right-click Tortoise=>>delete Delete, this method is not directly deleted, but the file or folder status set to delete, but also require us to use SVN commit to the SVN server after the actual deletion.

Description: Actually, from the time you check the source code into the SVN server, each version of the data and files, which you have deleted, can also be checked out.

Note: When submitting source code to the SVN server, do not submit folders such as Bin,obj, otherwise it is cumbersome, except for the Web project's Bin directory, but DLLs that are generated by referencing other projects in the Web project's Bin directory do not need to be committed. Second: If your project references assemblies for other third-party controls, it's best not to simply refer to their installation location, but under your solution, add a library directory, copy the required assemblies here, and then reference them from the library directory.

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.