CS164: General Instructions for Handing In Homework and Projects

I assume here that you have set up working directories for yourself and (when it is formed) your team, as described in Using Subversion. As in that document, let's assume they are named ~/mywork and ~/teamwork.

To work on an individual assignment named, say hwk, first create and commit a subdirectory of your personal working directory (say ~/mywork/hwk) with the files you will eventually turn in. To do so from scratch, you can use

   $ cd ~/mywork
   $ mkdir hwk
    Create files in hwk 
   $ svn add hwk
   $ svn commit hwk
or, if we have supplied a skeleton for the assignment, start by copying it:
   $ cd ~/mywork
   $ svn copy $STAFFREPOS/hwk hwk
   $ svn commit hwk
Now start filling in the files, adding new ones as needed (and doing svn add on them to tell Subversion to track them), and committing whenever you've made some coherent set of changes (after each problem, perhaps).

When you are ready to submit, first check that you have everything with

   $ cd ~/mywork/hwk
   $ svn status
Look out for any files marked "M", "A", "D", or "R" (meaning they have changes you haven't committed yet); "?" (meaning that they are not being tracked and you may have forgotten to svn add them); "C" (meaning that you haven't resolved some merge conflicts); "!", "S", or other characters (meaning that you've messed something up). Make sure you fix the problems and commit everything. Actually, you should use svn status freely throughout to keep the repository abreast of changes to your working directory.

To actually submit, "drop a tag"—that is, copy your committed directory in the repository to your tags directory, like this:

   $ svn copy $MYREPOS/hwk $MYREPOS/tags/hwk-N \ 
   >      -m "Submit hwk"
where N is an integer that uniquely identifies the submission.

Team submissions are the same, except that the working directory is (in our setup) in ~/teamwork, and the team repository is at $TEAMREPOS. To prevent accidents, we won't let teams submit non-team assignments and vice-versa.

You can always see what submissions you or your team has made with

   $ svn ls $MYREPOS/tags
or
   $ svn ls $TEAMREPOS/tags
as well as
   $ glookup -t
You see exactly what's in one of these submissions by checking it out, as in:
   $ svn co $MYREPOS/tags/hw1-3 ~/check-hw1
   $ svn co $MYTEAM/tags/proj1-1 ~/check-proj1
where check-hw1 stands for a new directory name.

Some parting advice:


Page was last modified on Thu Jan 21 23:44:09 2010.
Address comments and questions to cs164@cs.berkeley.edu