SVN--VISUALSVN Server service-side and TORTOISESVN client-based use

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

Objective

In the previous article http://www.cnblogs.com/wql025/p/5177699.html, we talked about the first step in using SVN, which is to download and install the SVN server software--visualsvn Server and client software--TORTOISESVN. Now, let's learn how to use the most basic features of both software and how to use it on eclipse.

This article Reference site: http://blog.chinaunix.net/uid-26520343-id-3047514.html

First, as with Oracle, the SVN server is the first to open the service, so the small partners turn on the service as soon as it is turned on (if it is useful to this machine as the servers).

One, add a version of the library "Repository"

1. First open visualsvn Server Manager. Start-"All Programs-" VisualSVN Server Manager. :

Interface:

2.Repositories Right-click Create New Repository.

3. Select the default option and click Next

4. In Repository name enter a folder name as the folder to save the project, click Next

5. Select the default option and click Next

6. Select the default option, click Create

7. The storage address of the local SVN server has been built. Where https://Lenovo-PC/svn/is the root address of the machine. Dot Finish

The built-in interface is as follows:

Second, in the SVN server visualsvn set up users, user groups, empowering

1. Right-click the Users button to create a new User

2. Name and password for the user, click OK

3. A user has completed the creation of

4. Create user groups, right-click Groups, new Group

5. Name the new user group (the name of the local project that you want to import next), click Add, add the new user, click OK

6. Now you have added the Developer1 user for testproject, click OK

7. The user is now empowered. Right-click on the new version of the Repository TestProject.

8. Click Add

9. Select the object you want to empower. Can be for everyone, can be groups, can be selected under the users

10. Select the user and select the permissions you want to assign in the Purple box, click OK

11. We add a test user to the above method-the tester, who only has read only permission.

Third, upload the local project to/import the SVN server.

Import Https://Lenovo-PC/svn/testProject this address here.

1. Create a new project--testproject

2. Right-click on the project and select Tortoisesvn--> Import

3. After testproject/a name as the sub-path of the repository-the name is the same as the 2.2 imported project name, as the name of the project (if not, there is no project name after the import.) Pay attention to this point. ), and then in the box under "Import Information", fill in the "Import Project to the repository"-This is the log, click OK.

4. In the pop-up verification box, enter the user name and password as follows: Enter the created Developer1, 123.

Import succeeded.

5. Right-click to refresh the newly created repository TestProject to see the imported items.

Iv. checking out the project to the local

1. Right-click on the SVN Checkout (K) in the directory to be checked out

2. Click OK

3. Check out success

Five, modify, add Files ... 5.1 Modifying the Code

1. Select a Java file for this project.

2. Open with EditPlus, add a line of code, save and close.

3. You can see the changes after the change.

4. Now we submit the code, I am in the Mysvntest.java of the package submitted, or can be submitted directly on the Mysvntest.java.

5. Select the content submitted below, respectively Mysvntest.java and its backup--mysvntest.java.bak (note: The backup file for this file is a previous version of the backup. ), click OK.

6. Submission Completed

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.

5.2 Adding code

As with the original process of modification, this is not said here.

5.3 Update Code

Updating the native code is 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.

5.4 Renaming a file or folder and committing 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.

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

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 assembly here, and then reference it from the library directory, so you can think about it.

VI. Eclipse checkout of project from SVN server

1. Open the SVN repository view and click Add SVN resource

2. Fill in the SVN Server's section library address

3. Right-click on the project-"Check out the

4. Click Next

5. Select the project location and click Finish

6. Check out to local success

vii. Version 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 )

Postscript

Would have wanted to do a user rights test-that is, with the test user to see if you can modify the code svn checked out to eclipse, probably because in 3.4 step selected "Save Authentication", so when Eclipse checked out the SVN project did not pop-up input username/ Password verification box-This will have time to re-test later.

has been tested and the test results are consistent with the "PostScript", as follows:

1. When importing a local project to the repository, enter the user name, password pop-up box do not select "Maintain Authentication".

2. When eclipse checks out a local project, the Verify box "Enter User name and password" pops up.

3. When the password is entered, it will show the project under this resource--but for the sake of convenience, we still click on keep the password.

--Test failed--forget it, test later. the next test is tested on two computers.

SVN--VISUALSVN Server service-side and TORTOISESVN client-based use

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.