CS 23001 Course Linux Servers and Subversion Repository

All assignments must compile and run on the departmental servers (Wasp/Horent).
  • wasp.cs.kent.edu
  • hornet.cs.kent.edu
Log into these machines using your Flashline id and password. There are a number of clients you can use to log into these machines.
  • PuTTY
  • Secure Shell App in Chrome Extension
  • MobaXterm
  • ssh - installed on Mac and Windows


Subversion
All assignments must be committed to the course subversion (svn) repository. This is a version control system (git is another version control tool) that is widely used for storing and working on software. All grading and assignment submission will be done using svn and your repository. The subversion repository for the course is located at:

https://svn.cs.kent.edu/courses/cs23001/svn/USERNAME/

A shared directory/folder (shared/) is also in the repository. Check this out when you are in your cs23001 folder. Following the link will pull up the folder contents in the web browser. Data files, example code, and other course related information will be put here.

svn --username USERNAME checkout https://svn.cs.kent.edu/courses/cs23001/svn/shared/


Installing Subversion
If you want to use svn on your personal machine you will most likley need to install subversion.

MS Windows:
TortoiseSVN is a nice interface for subversion.  This is a client for MS Windows and integrates into the file systems.

You can also install WSL 2 on your Windows machine. This is a Linux (typically Ubuntu) subsystem for Windows. You will also need to install the software you need (e.g., compiler, subversion, etc.). This will give you a development environment much the same as Wasp/Hornet.

MacOS:
Recent versions of MacOS do not have svn installed. First, you need Xcode installed (this is Mac's IDE). If it is not already installed go to the app store for Xcode. The best way to install subversion is using Homebrew. Follow the instructions and install brew. Then after Homebrew is installed you can install subversion with the following command (in Terminal):
brew install subversion


Using Subversion

Complete information about Subversion can be found in the book Version Control with Subversion. Dale Haverstock has some nice notes on using Subversion.

A short video lecture on svn basics that goes over how svn works and its use in class. Best if used in full screen mode.

A tutorial at YouTube on using subversion.

There is a set of slides explaining svn in the shared folder in svn.

Your source code repository can be accessed via the check out command svn checkout. Use your user name for USERNAME below. It will create a cs23001 folder and you will need to go into that folder and do an update. You can also check out the shared folder in the same place. Below are the commands to check out your repository into your home directory on Wasp/Horent or personal machine.

#svn --username USERNAME checkout https://svn.cs.kent.edu/courses/cs23001/svn/USERNAME/ cs23001
#cd cs23001
#svn update

#svn --username USERNAME checkout https://svn.cs.kent.edu/courses/cs23001/svn/shared/
#svn update

Normally, you only check out your repository once (per machine). For example, you check it out on your laptop and on your department account. Doing this will give you two working copies of your repository. Before you start working on your files (for the day or a session) do svn update. This makes sure that your local working copy is up to date with any changes you may have made (from another working copy). After you make changes to your files you commit them to the repository with svn commit. It's preferable to commit after you made any major change or addition. This way nothing is ever lost and you can roll back to a previous version if necessary. If you did this work from you laptop (using MS visual studio for example) you can sign into your department account and do svn update. Now your working copy there will reflect the changes you committed previously.

Remember to:
1) ALWAYS update before you start working
2) ALWAYS commit after changes




Essential Subversion Commands

svn checkout http://www.foo.edu/svn/oop/username
svn co http://www.foo.edu/svn/oop/username
Checks out a working copy from the repository. Noramlly only do this once or when something is messed up and you need a fresh copy from the server.

svn update
Brings your working copy up-to-date with the server repository. Any changes made in the repository are put into your working copy. Always do this before you start working on a file (or repo).

svn add filename
Puts the file filename under control of the versioning system. Do this once when you create a new file or folder.

svn commit -m "Added new method."
svn ci -m "Added new method."
Commits the changes that you have made to the working copy to the server repository with a comment. Do this everytime you stop working on a file.

svn status
Gives the status of all files in the current versioned directory/folder. Tells you if files are under version control (been added). '?' - file is not under version control. You may have forgotten to do an svn add. Object files (e.g., main.o) should not be under version control and will have a ?. 'M' the file is modified. You will need to do a commit.

svn delete filename
Deletes the file filename. Only occurs in the working copy, i.e., must be committed to show up in the repository.

svn mv oldfilename newfilename
Changes the name of a file from oldfilename to oldfilename. Only occurs in the working copy, i.e., must be committed to show up in the repository.

svn mkdir directory_filename
Creates a new directory with the name directory_filename. Only occurs in the working copy, i.e., must be committed to show up in the repository.

svn mv old_directory new_directory
Changes the name of the directory with the name old_directory to the new name old_directory. Make sure to commit any work that you have and perform an update first to avoid any problems. Only occurs in the working copy, i.e., must be committed to show up in the repository.

svn log filename
Presents information about the various versions of filename. Can be used to find the version number that corresponds to a version that you may want (based on the annotation given when committed).

svn update filename -r####
If you want to move back to a previous version use the update with the -r option. Get the version number from svn log filename and put it in the ####.


URL:http://www.cs.kent.edu/~jmaletic/CS23001/svn.html
Last update (EST): January 24 2024 13:27:17.