Assignments‎ > ‎

Integrating Subversion and Eclipse

posted Jan 5, 2010, 11:02 AM by Allen Downey   [ updated Jan 27, 2010, 7:30 AM ]
Subversive is an Eclipse plugin that provides an interface to Subversion.

1) Install Subversive by selecting Help -> Add new Software.   In the "Work with" menu, type

and press Enter.  In the "Type filter text" field, type "subversive" and press Enter.  Under "Collaboration" you should see "Subversive SVN Team Provider".  Click its checkbox and press Next twice.  Accept the license agreements and press Finish.

2) When the install finishes, restart Eclipse.

3) To check out a project from a repository, select New -> Project, open the SVN menu item and select "Project from SVN".  Click Next. 

   3a) If this is the first time you have used Subversive, the "Install Connectors" dialog should appear.  Select "SVN kit 1.3.0" and press Finish.  In the Install dialog, press Next twice and then Finish.  When the install is complete, restart Eclipse and go back to step (3).

4) Now you should be looking at the "Checkout from SVN" dialog.  In the URL field, type the URL of your branch, which is

Enter your Username and Password (get your password from check "Save password" and press Next.  If there is a "problem" with the certificate, click "Trust".

5) In the "Select resource" dialog, click "Browse", open the "trunk" item, select the Histogram project and press OK.  Press Finish twice.  You should see the new project in your Project browser.

6) Open a source file in the package you just checked out and modify it.  Run the program or save the modified file and then select the modified file in the Package browser.  Right-click to bring up the item menu and select Team->Commit.  In the Commit dialog, enter a comment and press OK.

7) If you have an existing package and you want to bring it under version control, select the package in the Package browser, right click on it and select Team -> Share Project.  Select SVN repository type and press Next.  Select your repository and press Finish.

8) Once you have a project under version control, you can select items from the Team menu.  The ones you will use most often are probably Update and Commit.

Branching a project

We will do the following steps in class:
  1. Create a new Project from SVN and check out this package.
  2. Branch the project, selecting "Work in branch."
  3. Make a change.
  4. Check in the change.
  5. Confirm that the change applied to your branch and not the version in the trunk.