Subversion in CS 225

Subversion will be used throughout this semester as the version control system
for MPs and labs. Specifically, we will be using SVN for two functions:

Distribution of provided code.

Submission of your code.

While we do not require that you learn and use good version control practices,
we cannot stress enough how useful a good version control system can be when
good practices are used. The following is a brief list of good version control
practices:

Always use a good commit message which describes the changes in the commit.

Never check in broken code. (This is more important when working in groups,
but still good practice.)

Commit regularly and frequently. For example, commit when you’re done writing
a function. This allows both simpler commit messages and greater confidence
in the repository.

Again, the above practices are not hard and fast, nor complete, but they should
help you complete your MPs and future coding projects should you use SVN for
them as well.

The Commands

svn help

Syntax: svn help [SUBCOMMAND]

The help command displays the internal SVN help. svn help displays an
overview of the available subcommands, and svn help SUBCOMMAND gives the help
for a particular SUBCOMMAND.

Example

To get help on the add subcommand, run:

svn help add

svn checkout (svn co)

Syntax: svn checkout URL [directory]

The checkout command is used to download a copy of the repository located at
URL. If directory is given, the repository is downloaded into that
directory. By default, it is downloaded into a directory named after the last
segment of URL.

Example

To checkout this semester’s repository into a directory named cs225, run:

If the mv command gives an error, that means that you’ve likely already done
this at some time in the past. Either delete cs225.old (after checking that
you don’t need anything in it), or pick a different name (e.g., cs225.old1).