Installing the SVN client plug-in in eclipse
1.1 Eclipse Plug-in application market
Access Eclipse Marketplace Client in eclipse to search for subversion, download plugins, and install as prompted.
1.2 Using a compressed package
If the network can not be used to download a good plug-in compression package Eclipse_svn_site-1.10.5.zip, this package is from http://subclipse.tigris.org/ The website (Subclipse is the name of this eclipse plugin) is downloaded. The installation method is:
① unzip the Eclipse_svn_site-1.10.5.zip in features and plugins both directories
② copy features and plugins to the Eclipse installation directory/dropins/eclipse_svn_site-1.10.5
③ Restart Eclipse
④ into eclipse, turn on WINDOW→PREFERENCES→TEAM→SVN, see the following interface that explains the SVN plugin installation success
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
① the file icon will be "?" after the new file is created. Identity that indicates that the file has not been included in version control
② Right-click on the newly created file →team→ add to version control so that "+" appears on the file icon, 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
① update the entire project by right-clicking →team→ on the project
② 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 the team synchronizing perspective, select what you want to submit in the project, usually the entire contents of the project
1.8 Restoring historical versions
① Right-click on the file you want to reply to →team→ display the 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 modified, 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) The contents of file a change as follows
Public Static void Main (string[] args) { System.out.println ("Edit by command!"); System.out.println ("Edit by command!"); <<<<<<<. Mine System.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!"); } |
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 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 extension. R 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 to resolve the conflict.
(4) New files in the same directory as the conflicting files, with the extension. R large version number, such as MyCRM.java.r14, whose content is the server-side file content when the conflict occurs.
② Resolving conflicts
(1) Right-click on the conflict 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) Correct local content as needed and in real-time-this process is likely to require the necessary communication between two developers involved in the conflict-machines and programs that do not yet completely replace AI. The corrected file icon becomes a "four-corner", while the <<<<<<<. Mine, =======, and >>>>>>> R14 in the conflict file are removed.
(3) On the conflict file, right-click on the →team→ tag to resolve
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 file, the file icon becomes "Gold cylinder".
Disclaimer: This article is organized by looking at the information of Silicon Valley.
Installing the SVN client plug-in in eclipse