SVN Learning (iii)--Installing and using the SVN client plugin in eclipse

Source: Internet
Author: User
Tags svn svn client

0 Basic Concept Understanding

0.1 svn works: Take a client/server model--Save each version of the project file in the server's repository, and all programmers involved in collaborative development save a working copy on their local computer. SVN supports the programmer to update the local copy to the latest version on the server side, and also supports updating the local copy to the server side, and the subsequent update does not overwrite the previous update, but is saved as a new version- SVN even supports restoring a local working copy to a historical version of a server-side save.

0.2 SVN basic operation

Checkout (Checkout): The entire download of a server-side created project to the local, this is the first step to participate in development after the project team, only one time.

Update : Updates the local file to the latest version on the server side, usually once a day before working or modifying a common file.

Commit : commits the local modification to the server side. It is usually done once a day before or every time a function is implemented and a module is completed.

1 use of SVN in eclipse

1.1 Eclipse Plug-in application market

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

1.2 Using a compressed package (recommended)

If the network can not be used to download a good plug-in compression package Eclipse_svn_site-xxx.zip, this compression package is from the http://subclipse.tigris.org/website (subclipse is this Eclipse the name of the plugin) to download. The installation method is:

① unzip the Eclipse_svn_site-xxx.zip in features and plugins both directories

② copy features and plugins to the Eclipse installation directory /DROPINS/SVN

③ Restart Eclipse

④ into Eclipse , turn window→Preferences→Team→ svn, see the following interface that explains the SVN plugin installed successfully

1.3 Creating a resource pool location

① Switch to perspective SVN Repository Research

② Creating a resource pool location

You can view the file and directory structure in the repository at this time

1.4 Checking out

There are two kinds of ① detection

<1> Gets a few fragmented files from the server and cannot be checked out as a project

A new Project Wizard pops up, so this is because we need to create a project to hold the files retrieved from the server side

<2> from the server side is a complete project, such as

This must be checked out as a project

when a project is checked out from the server, it becomes a working copy, which is automatically created under the root directory . SVN hidden directory

1.5 Submit

① A new file is created, the file icon will be "? "Identity, indicating that the file has not been included in version control

② Right-click on the newly created file →Team→ add to version control so that the file icon displays "+", indicating that the current file is in version control but not yet committed to the server.

③ Right click on the file to be submitted →Team→ submit ... The file will be submitted and the log can not be filled in the popup dialog box. After the file is submitted, the icon changes to a "golden cylinder" indicating that the current file version is consistent with the server side.

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

1.6 Update

① updates the entire project by right-clicking on the project →Team→ update

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

1.7 Sharing items

① the new project created in Eclipse wants to be published to the SVN server side, which can be implemented through a "shared" project

② Right-click on the project →Team→Share Project ... → Select a version control tool

Select a resource pool location

Switch to Team Synchronizing Perspective, select what you want to submit in the project, usually the entire contents of the project

1.8 replies. Historical version

① Right-click on the file you want to reply →Team→ show resource history → get the following interface

② Select a history point right-click → get content. The file reverts to the state of the specified version, and the icon changes to "*".

③ Get history, if the following error message appears

You can resolve this by setting anon-access in the svnserve.conf file in the corresponding repository to none .

1.9 Resolving conflicts

① what happens when a conflict occurs

<1> Two developers,Harry and Sally, downloaded file A from the server side, respectively .

after <2>harry changes , a becomes a ', and after Sally modifies it,a becomes A'.

<3>harry First Commit, so that the server-side file version has become a'

<4>sally Local file a"is out of date, at this time she was unable to submit the file, the server will ask her to do a first update operation.

<5> now There are two possibilities for Sally's update operation

(1) Sally 's changes were not in the same position as Harry, and the update operation attempted to merge the file successfully.

(2) The changes Sally made were exactly the same as Harry , and the update operation failed to attempt to merge the file, and a conflict occurred.

<6> After a conflict occurs, the local working copy will change as follows

(1) file A changes in the contents of this

Among them, from <<<<<<< mine to ======= is the content of the local copy when the conflict occurs. From ======= to >>>>>>>. R14 is the latest content on the server side when a conflict occurs. Note that the number behind R is the server-side version number at the time of the conflict, and possibly any integer value,R14 is just an example.

at the same time the file icon becomes a "Yellow!" ”。

(2) new files in the same directory as the conflicting files, with the file name extension . Mine , whose content is the file content of the local copy when the conflict occurs.

(3) new files in the same directory as the conflicting files, with the file name extension . R the minor version number, for example MyCRM.java.r13, which is the content of the server-side file before the conflict occurs, can be used as a reference for resolving conflicts.

(4) new files in the same directory as the conflicting files, with the file name extension . R Large version number, for example MyCRM.java.r14, whose content is the file content of the server side when the conflict occurs.

② Resolving conflicts

(1) Right click on the conflicting file → Team → edit conflict ... → The following interface appears

Displays local content and conflicting content in a contrasting way, with local content on the left and conflicting content on the right. Local content can be modified.

(2) correcting local content as needed and practical-this process is likely to require the necessary communication between the two developers involved in the conflict-machines and programs that do not yet completely replace AI. The corrected file icon becomes a "four-corner", with the <<<<<<<. Mine, =======, and >>>>>>> in the conflict file. R14 and other marks will be removed.

(3) Right click on the conflicting file → Team → Mark for resolution

both the. Mine file and the . R version number file are automatically deleted, and the icon for the conflicting file becomes "*", indicating that it can be submitted.

(4) submit the file, and the file icon changes to "gold cylinder".

SVN Learning (iii)--Installing and using the SVN client plugin in eclipse

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.