COMP 310

Using the Subversion Source Control

    Current Home  Java Resources  Eclipse Resources

The page will discuss how to use Rice's Subversion source control facilities with the Subclipse plug-in for Eclipse.

To use Subversion ("SVN") source control for managing projects or for turn-in, be sure to first install the Subclipse plug-in

If you wish to manually turn-in work from the Unix command line, then you will need to initialize the turnin directories as describled below.

Rice IT directions on using Subversion, which includes directions on how to make your personal SVN repositories: https://docs.rice.edu/confluence/pages/viewpage.action?pageId=25170300

Help on using Subclipse is available through the Eclipse Help system.   From the main menu, select Help/Help Contents and then click on the Subclipse chapter.

Open a SVN Perspective

To work with Subversion, you must first open a SVN "perspective":

  1. Click on the menu item Window/Open Perspective or the "Open Perspective" button on the upper-right corner of the Eclipse window.

  2. A sub-menu will open.   Click on "Other...".

  3. The "Open Perspective" dialog window will open.   Highlight "SVN Repository Exploring" and click "OK".

  4. A total of 4 new tabs will open:  "SVN Repositories", "SVN Annotate",  "Task Repositories" and "History".

  5. Once the perspective has been created, a button for it appear on the upper right corner of Eclipse.

 

 

Add a New SVN Repository to View in Subclipse

It is possible to have many different repositories of code, for instance one's personal development repository and the course turn-in repository.   To use a repository, you must first add it to Subclipse.

  1. Either right-click the "SVN Repository" and select "New" then "Repository Location..."   or click the "Add SVN Repository" button at the upper-right corner of the SVN tabs.

  2. The "Add SVN Repository" dialog window will open.   Type in the URL of the desired SVN repository and click "Finish".

  3. When asked, enter your NetID login credentials.

 

Add an Existing Project to Subversion

Usually one has already started a project and needs to add that code to source control.  

  1. Be sure you are in the "Java" perspective.

  2. Right-click the project that you wish to add to source control, scroll down the pop-up menu and click on "Team/Share Project...".

  3. In the dialog that appears, highlight the "SVN" repository type and click "Next".

  4. Assuming that you already added the deisred repository as per the directions above, click on "Use existing repository location" and highlight the desired repository that you wish to use.  Click "Next".

  5. Either use the project name as the folder name or create a specific folder name to use.    You can create the save location as a sub-folder of a new or exisitng folder.   IT is recommended that you repository's folder structure mirror your local workspace structure.  Click "Next".

  6. Add any desired commit comments that will help identify this project from all others.  Click "Finish".

  7. When asked, let Eclipse open the "Team Synchonizing" perspective.

At this point SVN knows about all the files in your project, but those files have not yet been "committed" to the repository and fully synchronized with the source control.

 

Committing the Entire Project

Committing the entire project will take all files that are part of source control (Careful!  It is possible to have files that are not in source control!) and upload them to the SVN repository and reconcile those files with any changes that anyone else has made.

  1. Be sure you are in the Java perspective and that the project has already been added to SVN.

  2. Right click the desired project and scroll down the sub-menu to select "Team/Commit..."

  3. A dialog will show all the files which have been changed since the last commit.   Type in a comment that descibes the changes that were made.   Click "Ok".

 

 

 


To use manual turn-in from the Unix command line, you must first initialiaze the Comp310 repository.  Follow the turn-in directions at CLEAR for "turnin init":

  1. Use SSH (available from Rice IT) to login in to a terminal session on clear.rice.edu using your NetID.

  2. At the command prompt, run the command  "turnin init comp310"  (no quotes).   This only needs to be done once.

  3. Log out of CLEAR.

 

 

 


© 2017 by Stephen Wong