There are two different Eclipse plugin that integrate Subversion (SVN) with Eclipse, Subversive and Subclipse. They are very similar in many ways.
There are two different ways to start the process of installing Subversive or Subclipse.
However, before you start note that it may be difficult to install the SVN Connector on Windows machines running Eclipse Oxygen. If this is your current environment then you have two options - install Eclipse Neon instead or figure out how to install the connector (which is available from Polarion.com) manually. (Bug report 518033 may prove useful in this regard.)
To start the installation using the Eclipse Marketplace you should:
Subversive
or Subclipse
in the “Find:” textfield and click on the magnifying glass.To start the installation using the installer you should:
Regardless of how you start the process, after it is completed you should restart Eclipse.
If you are installing Subclipse, you may be prompted to install the SVN Connectors in a dialog box. IF NOT AND YOU ARE USING SUBCLIPSE, YOU MUST FORCE THIS PROCESS MANUALLY AS FOLLOWS: Click on Preferences (which may be under Windows or the main Eclipse menu), expand “Team”, and click on “SVN”. This should open the dialog box. If not, click on the “SVN Connector” tab, and click on “Get Connectors…”. Then:
ssh
client. So, you should probably use SVN Kit. (Note: stu
currently supports SVN 1.9.3, so any connector for 1.9.3 or lower should work, but you should probably use the most recent version lower than or equal to 1.9.3.) You can change the SVN interface by clicking on Preferences-Team-SVN and selecting the “SVN interface” from the “Client:” drop-down list.
Some Subversions Repository Servers use http
(or https
) as the communications protocol. stu
uses ssh
.
svn+ssh://stu.cs.jmu.edu/cs/students/csXXX/SSYY/teamNN
where XXX corresponds to the course number, SS corresponds to the semester [either fa or sp], YY corresponds to the year, and NN corresponds to the team number). Note: If you are using a computer (e.g., your personal computer) in which your username is not your JMU eID, you should insert eID@
between //
and stu
(where eID denotes your JMU eID).
The plugin will need to authenticate with stu
every time an operation is performed, and this can be quite inconvenient. There are two ways around this.
General
tab.In either case, should not save your authentication information on a “public” machine.
The Subversive and Subclipse plugins enable you to execute SVN commands from within Eclipse.
In general, you should use the Language (e.g., Java) Browsing Perspective when working on a project. The SVN Repository Exploring Perspective and Team Synchronizing Perspective, while useful, can be confusing because they provide information about the repository not about the (local copy of the) project which is your real concern.
Also, remember that adding a file to a project does not necessarily add the file to version control. That is, you sometimes want to add files to a project and not put them in the repository. Hence, when you add a file to a project, if you want it to be under version control you will need to manually add it to version control (see below). The Language Perspective will put a ? icon on files that aren't under version control and a cylinder icon on files that are. A file that has been changed (and saved) locally but not committed will have a > character to the left of its name. A file that has been changed but not saved locally will have an * character before it's name in the file tab (there will be no indicator in the Language Perspective/Package Explorer).
To add a project to an existing repository:
When the SVN window appears, enter a commit comment (like “Initial Commit”) and click OK.
To add a file to version control:
Assuming you have already added one or more repository locations to Subversive, you can check-out a repository for the first time and create a local/working copy in a few ways. One way is to:
Another way is to:
To update your local working copy (from the repository):
If you have any conflicts, when you perform an update you will get a message like “One or more selected resources have unresolved conflicts”. You can see the conflicts in several different ways:
After you make the appropriate changes and save the file(s):
You might also be interested in the video at https://www.youtube.com/watch?v=7MB6T9ewidI
If you have any conflicts after you perform an update, you can edit them as follows:
To commit changes (to the repository):
Note: Remember to follow the appropriate process when committing changes. That is, perform an update before the commit (and resolve any conflicts, if necessary).
To execute other SVN commands:
To compare different versions of the same file:
For example, to see if anybody else has committed changes to a file you are working on choose “Latest from repository”.
You can then use the toolbar above the diff window to do many useful things. You can use the buttons with left/right-arrow icons to “Copy All from Left to Right”, “Copy All Non-Conflicting Changes from Right to Left”, “Copy Current Change from Left to Right”, “Copy Current Change from Right to Left”, and move between differences and changes. You can use the buttons with up/down-arrow icons to move between the differences.
Sometimes two people have made conflicting changes to the same file and the second person to commit needs to overwrite all of the changes that were made by the first person to commit. Obviously, the second person should carefully compare the two versions before taking this action, but if it is necessary, the second person can:
and then commit the folder/file.
If you are issuing SVN commands frequently, you may want to add buttons to the toolbar. To do so:
In addition to the other perspectives, Eclipse has a Synchronize Team Perspective that allows you to highlight and work with the files that have been changed since your last update. To access it click on Window-Open Perspective and then find the Team Synchronizing perspective (which may be under Other….
Right-clicking on a folder/file in this perspective will give you access to many common SVN commands.
The following Subversion commands would normally be preceded by
svn
and the plug-in commands would be initiated by
right-clicking on the file/folder.
SVN Command | Plugin |
---|---|
add | Team-Add to version Control… |
checkout | Import |
commit | Team-Commit |
delete | Delete |
diff | Compare With |
resolve | Team-Mark as Merged or Team-Mark as Resolved |
propset | Team-Set Property… |
revert | Team-Revert |
update | Team-Update or Team-Update to HEAD |