skip to primary navigationskip to content

Checking out a working copy

For more details on using Subversion visit the Subversion online instruction book

You may find it helpful to get help checking out your first project from one of the Computer Lab pagemasters who has experience with this.

But please pay close attention to what is done, so that you can use these instructions for the next project you need.

A special area has been set up for people to test out Subversion before using it for real.
You will find this area at:

Checking out from the trunk of the repository

The following instructions will check-out your project from the trunk of the repository:
You may find it useful to browse the SVN directory before checking it out.
The command for this is:

	svn ls svn+ssh:[Javascript required]/vh-cl/trunk/html
  • Decide on a directory where you want to place your working copy.

    For example, you have a public_html (/auto/userfiles/<crsid>/public_html) folder where your personal university webpage is stored. You could create a folder here to contain your working copy.

    This means that you can access your working copy both at work, at home, or on a different machine than your normal office PC, using HTTP.
    You can also test and view your webpages locally before committing them back to the repository.

  • In a Terminal window, type the following
    svn checkout svn+ssh:[Javascript required]/vh-cl/trunk/html \~/public_html/cl-preview/html

  • This will check out the contents of the folder html into a folder called cl-preview in the public_html area of your home directory.
    If you are checking out into the playground for testing, the command would be:
    svn checkout svn+ssh:[Javascript required]/vh-cl/trunk/html \ /anfs/www/html/playground/<crsid>

  • If you check-out your text project into a personal <crsid>, folder, then you and other users of the playground will know which working copy is yours and there will be less chance of others messing with it.

    If you enter a folder name that does not yet exist, then a directory with that name is created.
    You should only check out into an empty directory.
    Subversion will throw up an error if the destination folder is not empty.

  • When you check out your project something similar to the following will occur in the Terminal:
    $svn checkout svn+ssh:[Javascript required]/vh-cl/trunk/html \~/public_html/cl-preview/html
    A ~/public_html/cl-preview/html/<directory>/<filename>
    A ~/public_html/cl-preview/html/<directory>/<filename>...

    The A stands for Added to the repository.
    This list of files will be very long as it will be adding to your local working copy the contents of the html webpage directory (all files which have been entered into the repository).

Only check-out the trunk part of the directory tree.
If you specify the parent path then you will get a copy of the entire repository tree including every branch and tag of your project!
This will fill up harddisk space and upset the System Administrators.

Checking out smaller projects

It maybe that you only manage a small section of the website and have no need to check-out the entire html folder
The following describes how to check-out smaller project.

To check-out into your working copy just the Supporters Club folder, which is located at:
you would run the command:
svn checkout svn+ssh:[Javascript required]/vh-cl/trunk/html/supporters-club \ ~/public_html/cl-preview/supporters-club
which will copy the supporters-club folder and all its sub folders and files into your working copy which we will assume, for this example, is located at:
Another interesting example would be to check-out just the localsys folder:
svn checkout svn+ssh:[Javascript required]/vh-cl/trunk/html/local/sys \ ~/public_html/cl-preview/sys
If you omit the / in local/sys for this path, check-out won't run.

It is sometimes useful to find these files within a web browser to see how the URL is translated.
The URL what SVN uses when running check-out.

Checking out top-level folders only

If you want to check out the top level folder only and omit all sub- folders, use the -N non-recursive switch.
$svn checkout -N svn+ssh:[Javascript required]/vh-cl/trunk/html \~/public_html/cl-preview/html