and thenmkdir ooarch-work
Once you are in ooarch-work or whatever directory you will use to store your code, you run the following command, after replacing "CNetID" with your CNetID:cd ooarch-work
From then on you really only need to know three or four SVN commands. You execute these commands from within the directory created by the svn checkout command above. This directory is called your "SVN repository."svn checkout https://phoenixforge.cs.uchicago.edu/svn/CNetID-cspp51050-spr-13/
for each file X that you want place under SVN's control. Say you write your code in a file called lab1.c. Move the file to your checked-out folder (with name CNetID-cspp51050-spr-13/). Then, runsvn add X
from the command line. Now, your file is under version control, and is part of your repository. Next, usesvn add lab1.c
on any file X that has already been added (as above) to push your version of file X to the repository. Every time you commit, you send the committed file to a server (in this case, Phoenixforge). If anyone else uses checkout on that respository, they will be given copies of all files that have been added and committed, using the most recently committed version. The server also keeps all old versions of your files and logs of the changes made by each commit. You can see these logs by typingsvn commit X
An annoying attribute of the commit command is that it will place you into your default command line text editor without telling you why. The reason it does this is to give you a chance to attach a message to the commit. You absolutely should include in this message a description of the changes that come with the commit, for recordkeeping on your and our parts. These messages are part of the svn log output. If you want to change the default command line text editor, you need to change the EDITOR environment variable. If that sounds complicated, I suggest using the -m flag with the commit command as follows:svn log -v
Usesvn commit -m "your commit message here" X
to update all files controlled by SVN to their newest versions. If you checkout a copy of a repository in two separate folders, then add, modify, and commit files from one of the folders, you can use this command from within the other folder to update the files in it.svn update
This is the command we will be using to get your work: we will checkout every student's repository and then use the update command once an assignment's deadline has been reached. Then, we will be able to see the most recent version of your submitted assignment and grade it.
We will also place your grades in your SVN repositories. You can use the update command to obtain your grade files once we have committed them. We will notify you when this happens by e-mail. To see if you have local uncommitted changes, use
or for more information,svn status
These list 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.svn status -uv
There are many, many other SVN commands. If you are interested in learning more, feel free to send me an e-mail or read one of the tutorials below.
The top entry in the "svn log" output contains the SVN server's record of the commit time, which you can compare to what your local computer reported via "date" just before the commit. This is just like the svn log commands above, but brings up the logs for file X only.date svn commit -m "time testing" X svn log X
sudo apt-get install svn
This tutorial was adapted from Gordon Kindlmann's, which can be found here: http://people.cs.uchicago.edu/~glk/class/scivis/svn.html.