Handing in work for cs154-2019

  1. This page covers how we use Subversion and the command-line tool "svn" in cs154, used to distribute files to you and to receive your finished work. Remember that the CSIL Linux machines are the only machines we support for compiling and running code in cs154.
    • There are svn tutorials online, including here, and here. You can search for svn tutorial and svn introduction to find others. The canonical reference is the SVN book here, which includes HTML and PDF versions; you might want to review Chapter 1.
    • (by the way, for git users: we use svn because the centralized model makes more sense for this class, and because svn is simpler. Please refrain from creating git forks of svn repositories; the results are impossible to debug.)
  2. We run Phoenixforge to manage the subversion repositories in the class. Your use of phoenixforge, and the svn commands that connect to phoenixforge, is authenticated with your University CNetID and its password. You need to know your own CNetID. It is not a six-digit number.
  3. As a registered student in cs154, you should have a repository automatically created for you called "CNETID-cs154-aut-19", where CNETID is your own CNetID. You hand in files for this class by adding and committing files to this svn repository. We create sub-directories in this repository for each assignment that requires you to hand in files. The creation of per-student repositories is done automatically and periodically, based on the electronically accessible course registration information at that time.
  4. Check that you have a CNETID-cs154-aut-19 repository on Phoenixforge.
    • Go to the web page for cs154-aut-19. You should be able to login with your CNetID and its password. cs154-aut-19 is the "parent" for all students, TAs, and professors in cs154. Aside from this check, you won't need to worry about it. On the left, find and click on the link for "CNETID-cs154-aut-19", where CNETID is your CNetID. Then, under "Overview" on the left, you should see "Sub Project for YOUR NAME in Cs154 2019", where "YOUR NAME" is your name.
    • The URL for the web view of your svn project is
      https://phoenixforge.cs.uchicago.edu/projects/CNETID-cs154-aut-19
      where CNETID is your CNetID. You can also copy that URL into a new browser window or tab, replacing CNETID with your CNetID. You don't want to see The page you were trying to access doesn't exist or has been removed. Make sure your CNetID has been typed correctly.
    If you believe you are registered for the course, but do not see a repository created for you, ask a question (private to the instructors if you wish) On Piazza and put it in the "svn" folder.
  5. To create a directory for your cs154-aut-19 work on the CSIL Linux machines, use a command-line shell to run:
    cd ~
    mkdir cs154
    chmod 700 cs154
    cd cs154
    
    The chmod command is to ensure that you and only you can see the contents of your cs154 directory. Then, AFTER REPLACING "CNETID" with your CNetID:
    svn co https://phoenixforge.cs.uchicago.edu/svn/CNETID-cs154-aut-19
    
    After typing that, you may be prompted to accept the SSL certificate for the phoenixforge server. Enter 'p' to permanently accept it. Then, you will be prompted for your password. Enter your CNetID password. Now your local CNETID-cs154-aut-19 directory is your checkout of your individual CNETID-cs154-aut-19 repository.
  6. From then on you really only need to know three or four svn commands. You execute these commands from within the directories created by the svn co commands above.
     
    • For your CNetID-cs154-aut-19 project, you'll need:
      svn update
      
      to see files that we distribute to you. You will get announcements via Piazza when you have to do this. For every assignment, we will create and add a directory for that assignment in your repository, seeded with any necessary files for that assignment. You should never create your own per-assignment directory. To add (hand-in) file X within a per-assignment directory, you first need to do
      svn add X
      
      once, and then for all subsequent updates to X,
      svn commit X
      
      To see if you have local uncommitted changes, run:
      svn status
      
      This lists files that have uncommitted changes (marked with an "M"), and files that have not been added or committed (marked with a "?"), called "untracked" files in SVN.
  7. Remember: you should never create a per-assignment directory within your CNetID-cs154-aut-19 directory. After an assignment is assigned, you do an svn update to see whatever new directories and files are necessary. If you do try to create a directory, for example hw1, when hw1 has already been created by the cs154 instructors, you will get cryptic error messages when you try to svn add hw1, with something like: "Server sent unexpected return value (405 Method Not Allowed) in response to MKCOL request" This is how you know that you created and tried to add a directory that had already been created for you. Move the directory in question to somewhere else entirely (e.g. "mv hw1 ~"), do the "svn update" to get the correct directory, copy whatever important files you have in ~/hw1 into the new correct hw1, "svn add" and "svn commit" those files, and then "rm -rf ~/hw1".
  8. Because svn commit is how you are handing in your work, be careful with it. Its proper use is your responsibility. In particular:
     
    • If you haven't done an svn add and svn commit, it hasn't been handed in. Use svn status to see uncommitted changes and untracked files. Make sure that you have done an svn add on all the files you want to hand in.
    • Double check that the files you think you have handed in, have really been handed in. You can look at the contents of your svn repository on the web, at a URL like:
      https://phoenixforge.cs.uchicago.edu/projects/CNETID-cs154-aut-19/repository
      but replacing CNETID with your CNetID.
    • To help you, the directories in your CNETID-cs154-aut-19 project should include a 00-checkme.html file that contains a link to a web page that shows the contents of that directory in the SVN repository. Use this to confirm what the graders will see when they collect your files, and to make sure that you have not submitted an empty ("0 Bytes") file by accident.