Install the SVN client plug-in Eclipse, eclipsesvn

Source: Internet
Author: User
Tags svn client

Install the SVN client plug-in Eclipse, eclipsesvn

Install the SVN client plug-in Eclipse

1.1 Eclipse plug-in application market

Access the Eclipse Marketplace Client in Eclipse to search for Subversion, download the plug-in, and install it as prompted.

1.2 use a compressed package

You can use the downloaded plug-in package eclipse_svn_site-1.10.5.zip to download the package from http://subclipse.tigris.org/website (subclipse is the name of this Eclipse plug-in. The installation method is as follows:

Decompress features and plugins in eclipse_svn_site-1.10.5.zip.

② Copy features and plugins to the Eclipse installation directory/dropins/eclipse_svn_site-1.10.5

③ Restart Eclipse

④ Open Window> Preferences> Team> SVN in Eclipse, and check that the SVN plug-in is successfully installed.

 

 

 

1.3 create a resource library location

① Switch to the perspective SVN resource library

② Create a resource library location

 

 

In this case, you can view the file and directory structure in the version library.

 

1.4 check out

① There are two detection cases:

<1> some scattered files are obtained from the server and cannot be checked out as a project.

 

A new Project Wizard will pop up. The reason is that we need to create a project to save the files retrieved from the server.

 

<2> a complete project is obtained from the server, for example

 

In this case, it must be checked out as a project.

 

 

 

After the project is checked out from the server, it becomes a working copy, and The. svn hidden directory is automatically created under the root directory.

 

1.5 submit

① After a new file is created, "?" is displayed on the file icon. Indicates that the file is not included in version control.

② Right-click the new file and choose "Team"> "add to version control". "+" is displayed on the file icon, indicating that the current file has been included in version control, but has not been submitted to the server.

③ Right-click the file to be submitted → Team → submit... the file will be submitted. In the displayed dialog box, do not fill in the log. After the file is submitted, the icon changes to "golden cylinder", indicating that the current file version is consistent with that on the server.

④ After the file is modified, the icon changes to "*", indicating that the current file or directory contains uncommitted changes.

 

1.6 Update

① When updating the entire project, you can right-click the project → Team → update

② When updating a specific file, you can right-click the file → Team → update

 

1.7 shared projects

① To publish a new project created in Eclipse to the SVN server, you can use the "share" project to achieve

② Right-click the Project → Team → Share Project... → select a version control tool

 

Select a resource library location

 

 

Switch to the Team Synchronizing perspective and select the content to be submitted in the project, which is usually all the content in the project.

 

 

1.8 restore previous versions

① Right-click the file to be replied → Team → display resource history → get the following interface

 

② Right-click a historical record point and choose "get content. The file is restored to the specified version, and the icon changes to "*".

③ If the following error message is prompted when obtaining the history

 

You can set anon-access in the svnserve. conf file of the corresponding version library to none.

 

1.9 conflict resolution

① Under what circumstances will a conflict occur

 

<1> two developers, Harry and Sally, downloaded file A from the server.

<2> after Harry modifies A, A changes to A'. After Sally modifies A, A changes to ''.

<3> Harry submitted the file step by step, and changed the version of the Server File to'

<4> Sally's local file a' is outdated. At this time, she cannot submit the file. The server will ask her to perform an update operation first.

<5> there are two possibilities for Sally's update operation.

(1) Sally's modification is not in the same location as Harry's, and the update operation attempts to merge files successfully.

(2) the modification made by Sally is exactly the same as that by Harry. The update operation fails to merge files, causing a conflict.

<6> after a conflict occurs, the local working copy changes as follows:

(1) The content in file A has changed as follows:

Public Static VoidMain (String [] args ){

System. out. println ("Edit By Command! ");

System. out. println ("Edit By Command! ");

<. Mine

System. out. println ("Edit By Eclipse! ");

========

System. out. println ("Edit By Command! New Edit ");

>>>>>>>. R14

System. out. println ("Edit By Command! ");

System. out. println ("Edit By Command! ");

}

Here, the content from <. mine to = is the content of the local copy when a conflict occurs. From ========>>>>>>>. r14 is the latest content on the server when a conflict occurs. Note that the number after r is the version number of the server in case of a conflict, which may be any integer. r14 is just an example.

At the same time, the file icon becomes a "Yellow !".

(2) Add files in the same directory as conflicting files. The extension is. mine. The file content is the content of the local copy in case of conflict.

(3) add files in the same directory as conflicting files. The extension is. r minor version, such as MyCRM. java. r13 is the file content on the server before a conflict occurs. It can be used as a reference for resolving the conflict.

(4) Add a file in the same directory as the conflicting file. The extension is the. r version number. For example, MyCRM. java. r14. The file content is the file content on the server when a conflict occurs.

② Resolve conflicts

(1) Right-click the conflicted file → Team → edit the conflict... → the following page appears:

 

The local content and conflict content are displayed in comparison, with the local content on the left and the conflicting content on the right. The local content can be modified.

(2) Correct the local content as needed and the actual situation-this process may require two developers involved in the conflict to communicate as necessary-machines and programs cannot completely replace artificial intelligence at present. After the correction, the file icon is changed to a "Star", and the <. mine, ========and >>>>>>>. r14 and other labels will be removed.

(3) Right-click on the conflicting file → Team → mark as resolved

 

In this case, both the. mine file and the. r version file are automatically deleted, and the icon of the conflicted file is changed to "*", indicating that the file can be submitted.

(4) Submit the file and change the file icon to "golden cylinder ".

 

 

 

Statement: This article is based on reading information about love Silicon Valley.

 

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.