UCSD Main WebsiteUCSD Jacobs SchoolDepartment of Computer Science and Engineering
spacer gif
spacer gif
CSE 120
spacer gifspacer gif
spacer gif
spacer gifCourse Overview
spacer gifspacer gifStructure
spacer gifspacer gifGrading
spacer gifspacer gifCollaboration
spacer gifspacer gifUseful books
spacer gif
spacer gifspacer gifSchedule
spacer gif
spacer gifProjects
spacer gif
spacer gif Homeworks
spacer gif
spacer gifWebBoard
spacer gif
spacer gif
spacer gif
Search
spacer gifspacer gifspacer gif
Advanced search  arrows gif

spacer gif
spacer gifspacer gif
spacer gif
spacer gif
spacer gif
spacer gif
spacer gifspacer gifspacer gif
spacer gif

Using Subversion for CSE120

Updated 4/30

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 Documentation section.

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 (cs120s1@ieng6.ucsd.edu) 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:

A    submit-proj1/threads
A    submit-proj1/threads/Communicator.java
A    submit-proj1/threads/LotteryScheduler.java
A    submit-proj1/threads/Rider.java

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 submission:

A    submit-proj1/nachos/threads
A    submit-proj1/nachos/threads/Communicator.java
A    submit-proj1/nachos/threads/LotteryScheduler.java
A    submit-proj1/nachos/threads/Rider.java

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.

spacer gif
spacer gif
spacer gifback to top ^
spacer gif
spacer gif
spacer gif
spacer gif
9500 Gilman Drive, La Jolla, CA 92093-0114
spacer gif
About CSE | CSE People | Faculty & Research | Graduate Education | Undergraduate Education
Department Administration | Contact CSE | Help | Search | Site map | Home
snoeren@cs.ucsd.edu
Official web page of the University of California, San Diego
Copyright © 2002 Regents of the University of California. All rights reserved.
spacer gif