Wendat Project
Schema and guidelines for encoding lexical data
Martin Holmes
2019–2024

Table of contents

3. Using the Subversion Repository

We keep all our XML files and related documents in a Subversion Repository. This is a version-control system that ensures that every version of every file can be retrieved if necessary, and prevents one person from inadvertently overwriting changes to a file made by someone else.

Subversion runs on one of our HCMC servers, which is at hcmc.uvic.ca/svn. In order to use it, you will need to install a Subversion client on your computer, and also learn a couple of simple command-line commands. Subversion is usually abbreviated to ‘svn’.

3.1. Installing a Subversion client

How you will do this depends on which operating system you are using.

3.1.1. Windows

Obtain a command-line client from CollabNet (http://www.open.collab.net/downloads/subversion/). Registration is required to download the program, but there is no cost. Make sure to download the correct version; you need the small one that ‘contains all Subversion command-line binaries’, not Subversion Edge, which is for running a server. Once the program is downloaded, install it by double-clicking the downloaded installer and following its instructions.

3.1.2. Macintosh

Installing svn on Mac has become slightly complicated recently because Apple have removed it from their XCode toolset. We now have to install it using Homebrew, which is a package manager for the Mac. Here are the steps:

  • Go to the Homebrew home page, https://brew.sh/.
  • Copy the long line of code under ‘Install Homebrew’ to the clipboard.
  • Open a terminal.
  • Paste that code into the terminal (Command-V)
  • Press return.
  • Supply your password when required.

The Homebrew install process takes a little while. When it completes, go back to the terminal and type this:

brew install svn

When svn is installed, test it by typing:

svn --version

in the terminal. You should see lots of mysterious information, but the first thing should be the svn version number which is now installed on your machine.

3.1.3. Linux

Subversion is installed as part of a regular desktop on most Linux distributions.

3.2. Checking out the repository for the first time

Once your subversion client is installed, the first thing we need to do is to check out the repository. To do this, you need to open a terminal window:

  • On Windows, click on the Start menu and type cmd into the search box.
  • On a Mac, select Terminal from the Utilities folder in Applications.
  • On Linux, press Control + Alt + T.

Now we'll check that svn is installed and working. Type svn checkout and press return. If the terminal responses that there are Not enough arguments provided, then svn is working OK.

Now we'll create a directory for our project files:

mkdir wendat

And now we've created that directory, we'll navigate into it:

cd wendat

And now we'll check out the files from the repository into our directory. Make sure you don't forget the space and period at the end of this command:

svn checkout https://hcmc.uvic.ca/svn/wendat .

Don't forget the final period.

The first thing you might see is a question about accepting a certificate. Basically, your computer is saying ‘I don't know this server you're asking me to connect to. Should I trust it?’ The answer is yes (of course); you should type p to accept the certificate permanently so you don't have to answer this question every time you connect. This may not happen, though.

Then the server should ask for your netlink user name and password. After that, you should see the files download to your drive.

3.3. Using SVN in your daily work

These are the basic rules when you're working with svn:

Before you start work, update your local files:

  • Open a terminal
  • cd wendat
  • svn update

You can leave the terminal open while you work. Then, when you're ready to commit your changes:

  • svn update
    (again, just in case anything else has been committed by someone else)
  • svn commit xml -m "A message explaining the changes you have made"

(Aside: we include ‘xml’ after the word ‘commit’ to specify that we only want to commit any changes that are in the xml folder. That way, if we've accidentally made changes to program code or other files in the repo, those changes won't be committed.)

That's basically it. If you see any warnings or error messages from svn, check that you're in the right folder in your terminal. You may also see error messages if two people have been editing the same file at the same time, and Subversion needs you to make a decision about whose changes should be kept.

3.4. Tips for using the terminal

Finding out where you are right now:

pwd

Moving up the tree one level:

cd ../

List files in a folder:

ls

List files in a folder with full information:

ls -al
Martin Holmes. Date: 2024-01-09