Configuring VISUALSVN Server server under Windows

Source: Internet
Author: User
Tags svn client svn update tortoisesvn

To download the installation file:

Server-side installation files: visualsvn-server-1.6.2

Client installation files: tortoisesvn-1.5.5.14361-win32-svn-1.5.4

The above is the version I used.

Two products are available on VisualSVN Server's official website, http://www.visualsvn.com. One is VISUALSVN and the other is VISUALSVN server (hereinafter referred to as server). The former is a plug-in integrated into Visual Studio, very powerful, but requires a fee

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

1, Installation of VISUALSVN server

Download the installation package, unzip it and get the. exe file, double-click to install

One of the repositories are changed to another disk directory to save, for the reason needless to say (according to the actual installation, the program path and the warehouse code path must be under the same drive letter, or start the service failed to cause the installation failure, strange problem).

It is also recommended to check the Usesecure connection entry, when only 443 and 84,432 ports are available (pay attention to your company's firewall issues and need to open the corresponding port for use if there is a conflict).

There is also a suggestion to use Subversion authentication mode. (If you have domain validation in the domain, it's relatively secure)

Step by step Next, the installation is complete, the default option to open the Operations management interface (you can also start with the program,VISUALSVN Open the Operations Management interface )

2, add a code base "Repository"

Right-click Repository

If checked, the trunk, branches, tags Three subdirectories are created below the code base Startkit, and if unchecked, only empty code libraries are created Startkit

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.

Take a look first, create a user and assign permissions to the code base

3. Create user and assign permissions to code base

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

Click OK and we'll create a user. Follow the above procedure to add Users Developer1, Tester1, Manager1, and then add these users to the project we just created

Right-click the newly created code base Startkit

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

Note: You may have noticed the groups in, yes, you can also create groups, add users to individual groups, and then authorize groups

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

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

(i), check in the source code to the 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:

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.

Clicking the OK button will pop up the form below and ask for your credentials

The source code has been successfully checked in to the SVN server. This is when team members can move out of the source code on the SVN server to their machines.

(b), check out the source code to the native

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

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:

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

(Attached: Pictures of different States)

Now we know how to check the source code into 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.

(iii) 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:

Click OK

(iv) Adding 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:

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.

(v) Update the native code consistent with the latest version on the 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.

Rename a file or folder and commit 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.

Vii. Delete files or folders and submit 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.

The above is just tortoisesvn the simplest of several functions, in fact, his function far more than these, other functions we can use in the process of slowly experience, some features I will be used in the following tutorial, then will and everyone to explain the usage.

Note: When submitting the source code to the SVN server, be sure not to submit folders such as Bin, obj, or it will be cumbersome. However, except for the bin directory of the Web project, DLLs that are generated by referencing other projects in the Bin directory of the Web project do not need to be committed.

A good habit: if the project references other third-party assemblies, such as Enterpriselibrary, FCKeditor, etc., do not simply reference them from their installation location, but in your solution, add a library directory, Copy the required assemblies here, and then reference them from the library directory, so what's the good of it, think about it.

Third, version of the Library migration

If there are two servers A and B, the repository is originally on a server, now to move to B server, as follows

1, update the repository in A to MyEclipse (note to remove the \webroot\web-inf\ under the Calsses folder, because this contains myeclipse automatically compiled files, if not deleted to upload to the repository, Check out the project sync will error), right click on the project-team-disconntect (disconnect)-Select the first-yes, the purpose is to use the original SVN or CVS when the project's. CVs and. svn files are erased

2, install the client and server on B, and then follow the above steps on the service side of B to build a repository, and then copy the project to a location in B, using the SVN client right-click Project, select Import imports into the repository

(Reference:http://www.cnblogs.com/lzhdim/archive/2009/04/23/1442189.html

http://hi.baidu.com/hsyl/blog/item/7ad43b2986af8bf498250a54.html )

"Turn from" http://blog.chinaunix.net/uid-26520343-id-3047514.html

Configuring VISUALSVN Server server under Windows

Related Article

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.