CS70 Submission System

In CS 70, we use an electronic submission system to handle programming assignments and most written work. The submission system handles getting the assignments, sharing the code between members of a programming team, and submitting ``working'' versions of the code for testing or grading.

Note that CS 70 is using a relatively new electronic submission system, first introduced in the fall of 2003. Be wary of any advice, help, or tips about the system that you might be given by students who used it in past years, or who have used the similarly named (but different) submission system for other courses. If you experience problems, please let us know by sending mail to cs70help@cs.hmc.edu.

Setting up a Directory

When you start a new assignment, you will need to set up a working directory. The cs70checkout command does this for you. If there are any files provided with the assignment, cs70checkout will also get those files. The syntax is:

cs70checkout assignment-name
For example, if the first assignment was called hw01, you would type:
mkdir -p ~/cs70
chmod og-rwx ~/cs70
cd ~/cs70
cs70checkout hw1
(The first two commands need to be done only once at the beginning of the semester, to create your master CS70 working directory that you will use to hold all assignments.)

Submitting Your Files

The files in your personal assignment directory (e.g., ~/cs70/hw01) are a working copy. That means you can change them as much as you want, but nobody else can see what you do -- not your partner, not the graders, not even the professor. When you want to make your work visible, you must submit your files with cs70submit *. You should submit when:

Note: "cs70submit *" picks up all your files in the current directory, including test files, scratch files, love letters, and whatever else you have lying around. So it's best to keep your directory clean.

If you decide to rename a file for some reason, the graders will see it under both the old and the new names. If that happens, put a prominent notice at the TOP of your README file, telling the graders which files are obsolete.

Whenever you run cs70submit *, it will tell you the names of the files it looked at. If the line begins with T, it was submitted. ("T" stands for submiTted. Don't blame us; blame the CVS designers.) If the line begins with ?, the file was NOT submitted.

When you're done with your assignment (except the README), you should run cs70submit * one last time and check the output to make sure everything was submitted.

You should run cs70submit * whenever you've reached a major milestone. It is wise to submit your code each time it seems to be "more-or-less working" even if it doesn't do everything it is supposed to (in case subsequent changes break something). In general, if your code compiles and doesn't crash immediately when you run it, it's probably worth submitting.

Testing

Some assignments may support a special argument to cs70submit of the form

cs70submit -t *
which submits your code, runs tests on your submission, and emails you the results. Assignments that support the -t switch will mention that fact on the assignment page.

Resynchronizing with the Master Copy

If you are working with a partner who has edited their working copy of the files and then checked in their changes using cs70submit *, you can update your working copy to include your partner's changes by running:

cs70resync

The resynchronization process works even if you have also edited the same files, provided that you have not been editing the same lines. If you have both edited the same part of the file, the resynchronization will produce a file that includes both parts, and you will have to merge the changes by hand. Until you merge them, you will probably get horrible compile errors.

If you get an error from cs70submit * or cs70checkin (see below) telling you that you should run cvs update, it is a sign that you need to run cs70resync because your partner has checked in changes that you don't have in your working copy.

Checking in without Submitting

When you use cs70submit *, it marks your files as a submission to be graded. Sometimes you may want to "submit" your files without counting them as a true submission. For example, maybe you submitted some code that works, and then you made changes that broke something. You would like to ask cs70help about the code, but you don't want the broken version to be graded. You can do that by checking in your files with cs70checkin *. This command works just like cs70submit *, except that it doesn't mark your work as an official submission.

Revisiting History

For your convenience, the submit system keeps a copy of every checked-in or submitted version of your files. If you want to recover an old version of your assignment, you can use the command:

cs70checkout -O hours assignment-name
This command will check out an earlier version of your assignment, from hours hours ago, into a directory named assignment-name.old. To avoid confusion, this directory is not a CS 70 working directory---you cannot submit from it. Instead you should copy any files you need from the old version into your main working directory.

Working Away from Turing

We assume that you will be working on Turing, either directly (on an NCD terminal) or over an ssh connection. It is possible to do the homework on your own machine(s), but you must keep your files on Turing synchronized with those on your machine. I will examine your files during the week of the assignment to see how much progress you are making, and if you have not checked in any versions, I will have to assume that you have done no work.

If you are using Mac OS X or Linux, the command:

rsync -aC -e ssh source destination
may be a useful way to keep your files in sync (see the rsync manual page for more information). For example, if you are jsmith on Turing, you might run:
rsync -aC -e ssh jsmith@turing.cs.hmc.edu:cs70/hw1 ~/mycoursework/
on your personal machine to download files from Turing, and then upload them after an editing session with:
rsync -aC -e ssh ~/mycoursework/hw1 jsmith@turing.cs.hmc.edu:cs70/
After uploading your files, you would also need to log on to Turing and run cs70submit * (or cs70checkin *).

Peeking at the Internals

The CS 70 submission system is just a wrapper around CVS, a source-code control system widely used in team projects. If you are interested in the internal CVS commands used by the submission system, you can run any of the cs70xxx commands with -v as the first argument. The CVS commands executed by the submission will be printed on your terminal. (However, you can't run these commands by hand, and you shouldn't try to execute any CVS commands directly. There is magic behind the scenes to handle permissions and privacy.)