Use version management tools SVN and eclipsesvn in Eclipse
Recently, in the project, I gradually felt that the original copy and paste code was heavy and suddenly remembered that someone talked to me about version management tools such as Git and SVN before. Since Java code is usually used, it is very convenient to use the SVN tool in Eclipse for version management. I have solved this problem this afternoon and can use it for the first time. However, I am not familiar with the concept of Version Management and may have errors. Let's take a summary of my work today.
1. SVN Installation
Because these codes are all self-written, you don't need to perform version management on the server. You only need to use local version management (well, it's really a bit low ). My own system is win7 32-bit, so I first downloaded Tortoise SVN on the Internet and tried to use it directly.
Note that I initially thought SVN was a software. Originally, it was Shell-based. That is to say, there was no integrated interface for operations, but it was operated in the context menu. Later, I found that the SVN plug-in can be directly used in Eclipse, And I installed the plug-in again in Eclipse. The name of this plug-in is Subclipse. At first, I wanted to install this plug-in directly in Marketplace, as shown in.
However, the "run timed out" error occurs during installation. The solution on the internet is as follows.
Open eclipse. ini-vmargs-Dosgi.requiredJavaVersion = 1.5-Xms40m-Xmx512m-Dorg.eclipse.ecf.provider.filetransfer.retrieve.closeTimeout = 3000-Dorg.eclipse.ecf.provider.filetransfer.retrieve.readTimeout = 3000
After the above statement is added, the Marketplace won't be able to install the software completely. After the statement is deleted, it won't work. It may be due to the current network condition.
Later on the Internet to find the Subclipse installation version, can download in this URL: http://subclipse.tigris.org/servlets/ProjectDocumentList? FolderID = 2240
Unzip the package as shown in:
Only copy the files in the "features" and "plugins" Folders decompressed by the site-1.10.13-1.9.x.zip file to the "features" and "plugins" folders under the eclipse installation directory.
Now, restart Eclipse to find that subclipse has been installed.
2. Basic use of Elipse SVN
1) First, open the SVN resource library flag. Go to windows-> show view-> other
2) locate the SVN resource library
3) you can see that the SVN resource library tab is on the right of the console.
4) Right-click and choose new> resource library location.
Here, because I am using local version management, the URL is filled with file: // D:/code repository (I knew it would not be blank)
5) create a project or right-click an existing project-> Team-> share project
6) you can see that the files in the project are already available in the SVN repository tab.
7) in these files, select "check out as a Project". For example, right-click the com folder and choose "check out as..."> "Java Project" (named XXX)
You can see that a new project has been created. I personally think this project is like a special amplification of some of the large projects, and I don't understand what it means. This requires attention.
If you want to modify the file to save the existing file, right-click the project (the project here is worth the main project, not the project of this branch)-> Team-> submit, remember to write a comment ~
If you want to implement version rollback, you only need to right-click-> Team-> display resource history
To return to a version, right-click the version and choose Switch Reversion 7.
If you want to compare the two versions, right-click the version and choose compare.