Science and Engineering at the University of Edinburgh
School of Engineering >> IT Services

School IT Help Line

SeeSup@ed

phone 505636

Using IT Helpline
School Helpdesk
For Collection/Drop Off and for New Users
10:00/12:00
14:00/16:00
(not Wed pm)

Useful Links

Subversion

What is Subversion?

Subversion is a version control system. It is used to maintain current and historical versions of files such as source code, web pages, and documentation. It is a replacement for the older CVS service. It is often abbreviated to svn. For more information on svn, and to familiarise yourself with the basic concepts, please read the Subversion Reference Manual

Engineering Subversion Service

We run an svn service within Engineering where you can request the creation of repositories for any projects you require. Once a repository has been created, 'repository managers' can be appointed who have the ability to change the access permissions. This is useful for sensitive research subjects, or for administering projects with multiple parts.

There are two ways to access svn repositories - the 'full' way using svn tools such as svn on the command-line, or tortoiseSVN, or the 'simple' way, using WebDAV.

The details on using svn are available in the Reference Manual linked to at the start, or by viewing the help which accompanies the svn command.

You can also Map a Network Drive to an svn repository for simple access.

However, there are some extra points which are specific to the Engineering setup of svn:

  • All access to the repository is authenticated via EASE. This means that external collaborators will need University Visitor Accounts to participate.
  • By default authentication is only needed to write, but not read the repositories. This can be changed by the Repository Manager.
  • We only allow the https:// access method for the repositories.

Requesting a Repository

To request a new repository, please contact SEESup, with the subject 'New SVN Repository'. Please state the name you require for the repository, and the username(s) of those who should be the Repository Managers. As a general rule, you should use your username as the repository name if it is for your own use, and use a specific name where it relates to a project, or is to be shared between multiple end-users.

A repository will be created with the name requested, and the default access rules applied.

If you have external collaborators wishing to use your repository, you will need to request a visitor account for them, so that they can use EASE to authenticate. Please contact your Institute Administrator to request this.

If you currently have a repository on the Engineering svn service, we will contact you about its migration.

If you are using an svn repository at a different site and wish to move it to the Engineering svn service, please indicate this in your repository request, providing as much detail as possible about the existing repository. In order to do the move, you will need to have some level of admin access to your existing repository to be able to take a copy for migration.

We also offer a Trac project page for each svn repository - if you would like this enabled, please add this to your Request.

Configuring a Repository

The repository can be accessed at: https://svn.see.ed.ac.uk/svn/NAME (replacing NAME with the repository name) - either through a web browser, or through the svn command.

The access rules live in an 'auth-file' - this is stored in a separate svn repository, managed by the IT Team. The right to edit the repository's auth-file is granted to all named Repository Managers. By default, the repository will be set up to be 'read-only' and you will need to change the auth-file before you begin to commit files.

To make changes to access rules, the Repository Manager should check-out https://svn.see.ed.ac.uk/svn/auth/NAME, edit the auth-file, then commit the changes back in.

In case of errors with the auth-file, you can use the svn tools to revert to a previous version if necessary.

Auth-File syntax

This is an example auth-file syntax with comments:


#comments begin with a #

#Folders are marked in []
#Permissions take the form user = permission
#Permissions can be empty, r, w or rw (none, read, write, read and write)
#Permissions are inherited down the tree
# * can be used in place of a user name to mean 'all users'
#Groups are specified with names beginning with @
#All usernames must be in the format name@EASE.ED.AC.UK
#All rules inherit through the tree unless overwritten explicitly


#Allow everyone to read the whole repository
[/]
* = r

#Allow user fred to read and write the folder 'project/work'
[/project/work]
fred@EASE.ED.AC.UK = rw

#Allow the group 'testers' to read the folder 'testing'
[/testing]
@testers = r

#Don't let user 'john' read or write the folder 'private'
[/private]
john =

#Define groups as follows
[groups]
testers = john@EASE.ED.AC.UK, fred@EASE.ED.AC.UK


The default auth-file created when a repository is set up gives everyone read access to the repository, and creates a repos-admin group, containing the Engineering IT staff. It is worth leaving this group and its rules in place for support purposes, but it can be removed if required.

Hook Scripts

We don't allow direct editing of hook scripts on repositories, as these are run directly on the system and thus could present a security flaw if misused. However, we do offer a standard hook script on all repositories that allows emails to be sent on commit. To make use of this feature, create a file in the same folder as your auth-file, called commit-emails and put a space separated list of email addresses to receive commit notification - for example:

jo.bloggs@ed.ac.uk someone@example.com

If you have a specific need for a hook script that isn't accommodated by the above, please contact seesup, including a copy of the hook script you need and information on which repository it should be applied to. We will vet the script and apply it on your behalf.

Last modified Thursday, 08-Jul-2010 10:59:26 BST