Skip to main content.

SVN and Subclipse Practice

Objective: To get set up for upcoming testing project, by practicing using Subclipse

Due: Before midnight on Monday.

Team Set Up

Email me, ccing your teammate, with your team name for the testing project.

Subclipse Set Up

Steve set up Eclipse so that each user can install her own plugins.

Install Subclipse

Subversion Practice

The following should all be done within Eclipse.

If you're on the Linux machines: While I just told you to set the SVN Kit Pure Java in the Preferences, change it back to the JavaHL JNI.

Checkout the example project:

  1. File --> Import --> SVN --> Checkout Projects from SVN
  2. Create a new repository (works from home computer too): svn+ssh://atmos.cs.wlu.edu/svn/csrepos/cs209_fall2016/
  3. If you're on the CS dept Linux machines, check the terminal where you started Eclipse. It's probably asking you questions. Say "yes" or type your password as appropriate. You will skip the next step. As you follow the instructions, check the terminal, and type in your password, as needed.
  4. Fill in your username and password for the CS department. You can click the "save your information" checkbox if that's helpful to you.
  5. Expand Example and select trunk
  6. Click "Next"
  7. Click "Check out as a project configured using the New Project Wizard"
  8. Click "Finish"
  9. Click "Java Project"
  10. Make the name be "SVNPractice"
  11. Finish

    If you're on the Linux machines, it will probably appear as if this is hanging. It kind of is. (grrr...) Check to see if the terminal is waiting for your password. There will also be waiting. After this step, if there is waiting, then doublecheck that the terminal isn't requesting a password.

Configuring Eclipse: Ignoring user-specific files

If you didn't do this step before ...

Some files are specific to the user, usually for Eclipse. These files should not be in the shared repository.

Go to Preferences (under Window or under Eclipse, most likely). In the Preferences window, go to Team and expand the arrow and click Ignored Resources. Click Add Pattern. Then, add the following patterns:

Click Apply, then OK

It's important that you ignore these files; otherwise, conflicts occur and it's hard to fix your shared project.

Practice updating and committing a file.

  1. Open src/cs209/WeAreHere.java
  2. Add a print statment that says something like username was here, where username is your username. The file should now have an asterisk on it in the project explorer.
  3. Right click on the file, click Team, click Commit
  4. If the files to commit include .project, .classpath, or .settings, stop and go back to the previous step and update your prefences.
  5. In a comment, describe the changes you made. Submit.

The file should no longer have an asterisk but instead have a cylinder, marking that it's part of the repository.

This will be more interesting as others commit/update the file. Hopefully, we won't have any conflicts.

Practice adding and committing a file

  1. Create a new file, named by your user name.
  2. Add some text into that file. The file should have a "?" on it.
  3. Right click on the file, click Team, click Add to Version Control. The file should now have a big plus sign on it.
  4. Right click on the file, click Team, click Commit.

Update your repository

Right click on the project, select Team -> Update to HEAD. If anyone has made any changes since you checked out the code, you'll see their code in your repository.

View the history of the project

Right click on the project, select Team -> Show History. You should see what your classmates did--which files they modified and their comments describing what changed.

Grading (10 pts)

Full credit for committing the requested files (and none of the files that should be ignored) and for writing a descriptive comment.