SVN User's Guide: Start On an Assignment

Back to SVN User's Guide

Step 1: Choose a Directory to Work In

The central concept of source control is you create a working directory on your local computer that tracks a directory (repository) on the server. Everything we do here is going to be relative to that working directory. If it must be on the desktop, at least create a folder there to work in.

Step 2: Checkout

In SVN, "checkout" means to get a copy of the repository from the server. In the folder where you want to create your working directory, right-click and select "SVN Checkout" from the context menu. In the picture below, I'm going to create my working directory in c:\ws\2380\.

When you click on "SVN Checkout" it will bring up the checkout dialogue. Here you have to specify the URL to checkout from (URL of repository), and the working directory to checkout to (Checkout directory). The URLs for class projects will be given with the assignment/lab, and always follow the same naming convention.

https://miso.cs.panam.edu/svn/<course>/<project name>/<your username>

In this example:

Generally, all you have to do is copy the URL from the assignment/lab and replace <your username> with your actual SVN username.

Notice that for the working directory, I am specifying a sub-directory within c:\ws\2380 called tomaie. I could just as easily call that sub-directory "lab2", if I wanted to, just make sure you pay attention to where your working directory is.

Once the URL and working directory are set, click OK. The first time you do this on a machine, you'll get the following message about the server (miso) not having a valid certificate. This is expected, and you'll need to "Accept permanently". If it changes later when working on the same machine, you should not trust it.

Next, log in using your SVN username and login. On any CS lab machine or personal machine, you'll want to check the "Save authentication" box, otherwise you will be typing that password in an awful lot.

On successful authentication, you should see the checkout list all the files being copied down from the server, like below.

Step 3: Verify What You Got

Click OK to close the checkout dialogue, and you should see the new folder you checked out. In this example, mine is "tomaie". Notice the green checkmark, which indicates that:

  1. The folder is tracking a SVN repository
  2. The folder is in sync, that is, nothing inside has been changed

Finally, if you go into that working directory, as below, you can see that this project had sub-directories part1 and part2. (Not every project will have starter code, the working directory may be empty.) Note that the sub-directories have the green checkmarks, indicating that they are also tracked and unchanged. In addition, the tracked directory has a sub-directory in it called ".svn" (you won't see that directory if windows is set to hide files from you). What you always can see is that if you right-click in a tracked directory you will see that the "SVN Checkout" option on the context menu is replaced by "SVN Update" and "SVN Commit".

You're now ready to get to work!

Back to SVN User's Guide