Version Control and Program Submission

Using Subversion

In order to use Subversion you must have the Subversion client program such as svn. The command-line program svn is available on loki, and can be installed in Cygwin (therefore it can be used in MS Windows). The details that follow will be for use on your account on loki. At the end I will indicate the change that you must make if you work in Cygwin.

Log into your account on loki (ignore this step if your are using Cygwin or a bash shell from another computer).

First you need to checkout a working copy of your files from the repository. The following command will checkout your code:

svn checkout http://classes.cs.kent.edu/svn/cs23021/002/username/cs23021

Replace username with your username on loki in the command.

The repository will respond and ask you for a password. This is your loki password.

If you are successful a working copy will be checked out into the directory that you entered the command. The working copy will be in a new directory whose name is your username.

If you move into working copy directory, you will see directory for each assignment. I created those for you.

At any point you can see the most recent files in the repository using a web browser. The URL is the same one that you used to checkout your code:

http://http://classes.cs.kent.edu/svn/cs23021/002/username/cs23021

Again, replace username with your username on loki in the command.

You will start working in these directories at the beginning of the project.

Once you have the created the source-code files in the proper directories in the working copy you need to add these files the version control system. Use the following command and replace filename with the name of the file that you want under version control (so it can be submitted):

svn add filename

Adding files puts them under version control in the working copy, but it does not update the repository. In order to update the repository you must commit your changes:

svn commit -m "Submitting first version of the program"

The text after the "-m" is a svn annotation or comment. It describes why the changes were made. Every time you commit any changes you need to give a brief explanation of what the change was for.

Take a look at your files using a web browser as you did before. You will probably have to refresh/reload the browser.

If you make any changes to your working copy of the file, you can update what is in the repository by issuing the commit command again.

Subversion from Another Account

You may be using an account that doesn't have the same username as your account on loki. You must tell Subversion what username you want to use when you enter the checkout command:

svn checkout http://classes.cs.kent.edu/svn/cs23021/002/username/cs23021 --username username