When we use the SVN plugin in Eclipse for team development with other members, the other members may submit changes to the project (add files, modify files, delete files, etc.) to the SVN repository every time.
If we want to get the latest version of the SVN repository, we need to update the project file from the SVN repository. 1. Quickly update all project files
In Eclipse, right-click the specified item (or select only certain files or folders in the project), and click "Team", "Update" in the context menu that pops up to update the latest version of the project file on the SVN server to a local project. Warning: Quick update of project files is simple and fast, but we generally do not recommend this because we do not know in advance what updates have been submitted by other team members since the last update from the server, and whether the changes are conflicting with their own local changes. Therefore, we recommend that developers try to update the project using the following methods. 2. Selective update of project files
In addition to the methods described above, we can also see which files of the SVN server have been updated and selectively update some of the project files by doing the following.
Right-click on the specified item and click "Team", "Synchronize with Repository" in the context menu that pops up.
If you are doing this for the first time, eclipse will prompt you to enter the Sync view, click "Yes". If you don't want to see the message again later, check "Remember my decision" first.
At this point, we enter the team Sync view.
As shown in the following illustration, Localupdate.java is a new file that we created locally, the file was not previously present on the server, Newupdate.java was created and submitted by someone else, Test.java was previously present, and others were later updated and submitted, and we also made changes to the file locally.
With this view, we can see very clearly which files have been updated, what changes I have made locally, and which files are in conflict (other people have submitted updates, and we can find the submitter's user name in parentheses after the file name). Click on the image number ① icon, you can only display the updated files on the server, click the icon ②, you can only display our locally modified files, the icon ③ is the default current view of Eclipse, while displaying both local and server updated files.
In the image above, select one or more files/folders updated on the server, then right-click on the Popup context menu, click "Update" to update the SVN server's latest version of the file to the local project (select the project root click "Update", It means that all the changed files on the server are updated to local.
Author: Software Compass (http://www.softown.cn), reproduced please keep the source.