Using Subversion for CSE120
Subversion (SVN) is the version control system we will be using in
this class. You will setup repositories on your group accounts, and we
will check them out to grade your project. Below are instructions for
setting up and using it for this class. For more detailed information,
see the project page and click on the Subversion link in the
Setting up your repository [only one person in
your group needs to do this step]
We did this part for you, move along move along.
Using your repository
First figure out what your group directory is. If you don't know send
me (email@example.com) an email. Suppose your group directory is
/home/linux/ieng6/cs120s/cs120sX/groups/g-FOO, then you'll want to
set the SVNPATH variable for convenience.
$ export SVNPATH=file:///home/linux/ieng6/cs120s/cs120sX/groups/g-FOO
You now need to checkout the repository version instead of the using
your local version. You can do this by typing:
$ svn co $SVNPATH/trunk
Once you have a repository version there are two main commands you
will probably be use: commit and update. Commit is when you are done
editing and you want to checkin. Update is when you want to get the
latest code that your group has checked in. Doing both are fairly
simple. Simply go to the directory you want to update or commit and type:
$ svn update
$ svn commit -m "your message"
When updating you may see several letters in front of the files:
U - Update (files were updated)
G - Merged (updated a modified file, but OK)
A - Add (new files were added)
D - Deleted (files were added)
C - Conflict
If you get a conflict, you will need to manually resolve it and
then tell Subversion you resolved it by typing:
$ svn resolved FILENAME
If you made changes to your code before SVN was setup for you. Now
would be a good time to copy over the files you modified and commit.
Turning in projects
This is where you have to be correct because we are using an
autograder to checkout and grade your projects. When you turn in a
project, you will need to snapshot a version of your repository. In
Subversion, every checkin is a snapshot, so you just need to make a
copy (or branch). The name of the copy must be named
submit-projX where X is the project number
(e.g. submit-proj1). For example, the command you want to run for
project 1 is:
$ svn copy $SVNPATH/trunk $SVNPATH/submit-proj1 -m "proj 1 submission"
If you want to change your project submission, you will first need
to delete the branch. This can be done with the command:
$ svn delete $SVNPATH/submit-proj1 -m "kill proj 1 submission"
Be careful not to accidentally delete your trunk. To verify that you did it correctly, you can run the command:
$ svn co $SVNPATH/submit-proj1
You should see your files checked out and your submitted
solution inside. This is the command we will run to check out your
submissions. Correct output looks something like:
Some of you are using Eclipse and needed to add a subdirectory so
it looks like trunk/nachos/. If you have done this, we also
will be accepting something that looks like the following for
Anything else will probably break the autograder.
Using Eclipse with Subversion off of ieng6
Hamed Fard has graciously written a tutorial on how to use Eclipse
with Subversion while interfacing with ieng6. I haven't tried it yet, but feel free to give it a shot. You can find it here.