Eclipse SVN Quick Start (SVN operations under eclipse, after installation)

Source: Internet
Author: User
Tags one more line

There is a picture of the truth: Reprinted from the http://www.blogjava.net/gdhqs/archive/2009/07/09/286053.html including installation, command line and so on

 

 

In the previous article, I wrote about how to import a project to the svn server in eclipse. This article describes how to perform basic SVN operations in ecipse.

This is the project after the last import in Eclipse:

 

The question mark (unversioned) is displayed. Run the commit command. Right-click Project> Team> submit

 

After the project is submitted, the small icon in the lower right of the project turns into a yellow bottle, indicating that the project version in eclipse is consistent with the project version in the server.

 

Since it is version control, it is meaningless to test Svn in just one eclipse. So I installed the second eclipse on the local machine to imitate other users in the same working group.

The first eclipse is called a, and the second eclipse is called B.

B now establishes a SVN server connection.

 

Then, run the project checkout Uploaded By A on the svn server to B.

 

 

I switched to javaee and found that the project has been checkout successfully.

 

Add a line of code in B, commit

 

At this time, we can see that a does not prompt that the version is different, but the code is still the original one.

 

At this time, we can take the initiative to compare the helloworld file in a and the latest file in the version library.

 

Now the helloworld file of the version library has one more line of code:

 

In this case, we execute the update command in a to update the project a to be consistent with the version library.

 

Modify helloworld in A and run the commit command.

 

Then modify helloworld in B. Note that the helloworld in B is not updated to.

 

Run the commit command

 

The prompt commit failed, so we can only update first. Execute the update command:

 

We will find that there are some more code, in which, ". Mine" indicates that the code is modified by ourselves, and there is no code in the version library. We can only manually delete these prompts ,:

 

Then run the commit command.

 

At this time, an error is prompted. Check the file again and you will find three more files.

 

Run team-> mark as solution to remove these three files.

 

Execute the commit command again and finally succeed.

 

At this point, we can use helloworld as a stable file and lock it. Team-> lock

 

The icon is dimmed.

 

You cannot modify it before unlocking it.

The update operation for a is awakened.

To restore the file to a version earlier than update, unlock helloworld, and then team-> restore

 

To restore helloworld to a previously submitted version, right-click the file and replace with-> Local History

 

Select the desired version to view the code of both, and then replace

 

When you go to the eclipse working directory, you will find that there will be a sub-directory under the SVN version control project. SVN hidden folder. SVN Folder project, which can be exported from Team>

 

At this point, the basic commands for running Svn in eclipse have been completed.

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.