CS:4980:1, Compiler Construction

Fall 2016 Subversion

by Douglas W. Jones
THE UNIVERSITY OF IOWA Department of Computer Science

Access to the Host Machine

The subversion repository for the compiler construction course is on the College of Liberal Arts and Sciences Linux server cluster. If you do not have an account on the CLAS Linux system, you will need one. Any U of I student should be able to create an account using this web form:
-- https://mail.divms.uiowa.edu/clas_linux/
This can only be done on campus or through a VPN connection from off campus; see the second handout below for help with this issue.

You should first follow the quick-start guide to get access to the Liberal Arts Linux servers:
-- http://www.divms.uiowa.edu/clas_linux/help/qsguide.html
Before this, you will want to read up on accessing the Linux servers from the Internet:
-- http://www.divms.uiowa.edu/clas_linux/help/start/remote.html

From a Mac or a Linux machine, you will be able to use the lab machines directly using the ssh linux.cs.uiowa.edu command from a terminal window, and the scp command can be used for uploads and downloads. All of the tools used in this course run equally well under MacOS and Linux.

On a Windows machine, you should probably use SecureCRT, available as a free download from:
-- https://helpdesk.its.uiowa.edu/software/signin.htm
SecureCRT includes an upload/download tool. You can also use PuTTY.

The Command Line

In this class, most of our development will be done using the textual command-line shell. As a result, we will emphasize the command-line interface to Subversion and command-line editing tools. There are GUI-based interfaces to Subersion that should be comfortable to novices more accustomed to the desktop drag-and-drop environment, but reliance on these is likely to be a problem, particularly if you find yourself moving back and forth between Linux on the one hand and Windows and Mac systems, on the other.

If you are unfamiliar with the Unix (and Linux and Mac) command line, this brief introduction to Unix may be helpful; it includes a list of the most common commands you will need to use:
-- http://homepage.cs.uiowa.edu/~dwjones/syssoft/unixtut.html

Most Unix (and Linux) system programmers use one of two editors vi or emacs. Neither is particularly friendly to novices, with rather steep learning curves, but they are very powerful and, unlike mouse-based editors, they can be very fast because your fingers never leave the keyboard. There are huge documents purporting to be introductory tutorials for the use of these editors, but if you are a raw beginner, this short introduction might be a useful place to start with vi:
-- http://homepage.cs.uiowa.edu/~dwjones/syssoft/vitutor.html


We will be using Subversion for collaborative programming. The first thing to do is see if subversion is installed on whatever system you are using. To do this, type the svn command on the Unix or Linux command line. If it is installed, you should see something like this:

$ svn
Type 'svn help' for usage.

Subversion is already installed on the CLAS Linux system. Once it is installed, take that advice and see what help it offers. Some of its help is actually useful, although you may find that you have to scroll back through quite a volume of helpful text to find what you wanted.

If Subversion is not installed, for example on your own Linux box, including your Raspberry Pi, and assuming that you have superuser privileges on the Linux system where you are installing it, use this command:

$ sudo apt-get install subversion

The sudo command says "run the rest of the command line as a command with superuser privileges." If superuser status has a password on your machine (some users of genuinely personal computers opt not to set passwords, preferring to use physical control of their machine as the only protection), the sudo command will ask for it before it continues.

The apt-get command gets software from the on-line repository for software maintained by the developers of your Linux system. It is used to install, update or upgrade your system. In this case, we are using it to install a package that was not previously installed.

A subversion repository for our class has been created at this URL:
-- https://svn.divms.uiowa.edu/repos/cs4980

Do not use that as a web address -- subversion uses the same HTTP protocols used for access to web pages, but it uses them in a very different way for uploading and downloading material. As a result, this is most definitely not the URL of a web site despite the fact that it looks like one.

To gain access to this repository, type this command, exactly as written, after you have installed Subversion on your machine.

        svn checkout --username HAWKID https://svn.divms.uiowa.edu/repos/cs4980

This will work without the --username HAWKID option if you are working on a machine where you have already set up your account using your HawkID as a user name. This is automatically true if you are connecting to Subversion from a departmental server. If you are on your own Linux system (say, a Raspberry), you have the option of setting up things so you log in using your HawkID.

If, on the other hand, you have a passwordless Linux environment, relying entirely on physical security for access control, or you have a user name different from your HawkID, you need to type in your own HawkID in place of the HAWKID given in the above command. For example, I would type --usernme dwjones.

On typing this command, Subversion will prompt you for your password. Use the same password you use for signing onto the CLAS Linux cluster. Usually, this is your HawkID password (but you can make it different). Once authenticated, Subversion will create a new directory in your home directory (assuming that was the current directory) called cs4980. As soon as I get things set up, that directory will contain a file called README, but we will add subdirectorys for each group, where each group's subdirectory will be the root directory for that group's project.