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.
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:
- File --> Import --> SVN --> Checkout Projects from SVN
- Create a new repository (works from home computer too):
svn+ssh://atmos.cs.wlu.edu/svn/csrepos/cs209_fall2016/
- 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.
- Fill in your username and password for the CS department. You can click the "save your information" checkbox if that's helpful to you.
- Expand
Example
and selecttrunk
- Click "Next"
- Click "Check out as a project configured using the New Project Wizard"
- Click "Finish"
- Click "Java Project"
- Make the name be "SVNPractice"
- 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:
- .project
- .classpath
- .settings
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.
- Open
src/cs209/WeAreHere.java
- 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. - Right click on the file, click
Team
, clickCommit
- If the files to commit include .project, .classpath, or .settings, stop and go back to the previous step and update your prefences.
- 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
- Create a new file, named by your user name.
- Add some text into that file. The file should have a "?" on it.
- Right click on the file, click
Team
, clickAdd to Version Control
. The file should now have a big plus sign on it. - Right click on the file, click
Team
, clickCommit
.
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.