SVN (subversion)

Subversion is a revision control system. A subersion repository, or "repo", is a big data structure that stores many different snapshots of your work in a space-efficient manner. Repositories are permenant archives -- they are almost never deleted. You interact with the repository by checking out versions of files or directories, modifying them, and checking them back in again. Checking in is called "committing". Each time you check something in, a permenant record of that version is made, along with a time-stamp and a mandatory comment from you. It will always be possible to recover any version that has been checked in. Whole books have been written about svn but you will need only the very simplest aspects of it.

Get a client

SVN is a client-server system -- a program running on your computer -- (called a client) interacts with a program running on the central server that houses the repository (called the server). So the first thing you will need is an svn client.

Find the repository we set up for you

Surprise! You already have an svn repository. Repositories are accessed via URLs and the URL for the top level of your repository is:

where "yourWustlKey" is replaced by your wustl key login ID (NOT your password). After the underscore you should put the current semester - e.g. in fall semester of 2016 you would use "fl16" after the underscore. You can explore your repo using an ordinary web browser, but when you first navigate to it you will be asked for your credentials. Use your wustl key ID and in the password field enter your wustl key password.

If you can't find a repository under your wustl key or your password is not accepted, test the login and password by attempting to log in to another WU site, such as the library.

Create a directory under which all your assignments will sit

You know how to create directory (i.e. folder) on your machine. Under this there will be subdirectories for all the modules of the course but you don't have to create those.

Check out your repository

unix or Mac: In unix or a MacOS terminal window (which is a version of unix so we'll just write unix from now on) you move among directories by using the command "cd". ("pwd" tells you which directory you're currently in and "ls" lists the contents of the directory, including subdirectories.) If you are new to unix you may find the following quick reference page useful:

Windows:Navigate to the directory you created in the previous step by using your usual, window-based mechanism of navigating folders.

Once you're in the right directory, for unix type:

svn checkout yourRepositoryURL

where yourRepositoryURL is replaced by the URL indicated above (and which you put into your browser to see the repository). This will create a subdirectory called cse587a_fl16 (with the part after the underscore indicating the current semester). This directory is under version control, which means it's linked to a directory of the same name in the repository.

Navigate to the subdirectory cse587a_fl16. Within that, you should find subdirectories for each module: Mathematica, Probability, HMMs, etc. Now navigate into the subdirectory for the current module, copy the completed assignment file into it, and type

svn add myAssignment.nb

(unix) or right-click on the assignment file and select "add" from the Tortoise subment (Windows). Unless instructed otherwise, you will need to copy completed assignments into the module guide subdirectory and svn add them for each assignment.

For each assignment

At any point before the start of class on the due date, you can commit your final version to the svn repository. In fact you can also commit partially completed versions along the way, to avoid losing work. For grading, we will always pull out the first version committed after the due date/time and check the commit timestamp to see whether the assignment was committed on time. To commit a version to the repository in a unix system, type

svn commit -m "A brief note describing the changes since the last commit."

Whenever you are in a version controlled directory this will commit all changed files in that directory an any other directories below it, recursively. You can also commit specific files or subdirectories (however you cannot commit specific files or subdirectories if there has a been no commit since the current directory was made).

Verify with the web browser

Since turning in homework on time is important, you will probably want to check the repository in your web browser the first few times to make sure you committed correctly.