Subversion server

From SourceWiki
Revision as of 14:53, 21 December 2005 by Jprenaud (talk | contribs)
Jump to navigation Jump to search


Introduction

The source server can be used to host your subversion repositories. It uses the WebDAV protocol and is therefore available from a webbrowser anywhere in the world which is great for collaboration with people outside the department. However, we still keep a fine control of who can access the repositories and your repositories are not open to the world by default.

Important: backup policy

We are doing our best to make Source as reliable as we can but keep in mind that it is an old machine.

The hard drive on Source is backed up once a day incrementally and a full backup is performed every week using the department backup system. Moreover, we backup the repositories separately if activity has been noticed.

However, we cannot garantee that a problem will not occur at some point. You are encouraged to use Source for your day to day work but please, keep important versions of your software backed up somewhere else too, just in case :-(

Creating a repository

First step

First contact JP Renaud or Gethin Williams to get a subversion account. They will create an empty directory for you and email you with login information.

For the sake of explanation, let's call your project myproject and the login you have been given mylogin. You will also be given a password, just type it whenever the software asks you to.

The repository will be accessible from a web browser at the URL http://source.ggy.bris.ac.uk/subversion/myproject/

Adding extra users

Blah blah

Using the command line client

The svn command line client

The command line client is called svn on Linux/Unix systems. It is available from most machines within the department. To check that you can use it, just type:

svn --version

If it is not available (the above command returns an error), contact a Computer Officer.

Importating data in your repository

If the data that you want to import into the repository is in the folder localfolder, you need to send the data inside this folder to the subversion repository. We recommend that you import your data into the trunk section of the repository. Using a trunk will allow you to branch and tag later on in your development. Read the Subversion pages for detailed information about this. The following instructions will import the whole content of mylocalfolder into the subversion repository:

cd localfolder
svn import . http://source.ggy.bris.ac.uk/subversion/myproject/trunk --user-name mylogin -m "Initial import."

This will import the content of localfolder into trunk in the repository and will use "Initial import" as the log message.

Checking out a working copy

To start working with Subversion, you first need to checkout your repository into a workingcopy:

svn checkout http://source.ggy.bris.ac.uk/subversion/myproject/trunk --user-name mylogin workingcopy

Now you can go into workingcopy and check that all is here:

cd workingcopy
ls -a

If everything worked, you can now delete localfolder. Note that in workingcopy and all its subfolders, you will find '.svn/' folders. They are used to track the changes you make to the working copy. You should never edit or delete these folders.

Day to day work

Now that your repository is setup and you have a working copy, read the Subversion pages to understand how to use the repository for your daily work.

Using TortoiseSVN on Windows

Day to day work

Now that your repository is setup and you have a working copy, read the Subversion pages to understand how to use the repository for your daily work.

Other graphical interfaces

Using websvn

After importing data in your repository, you can browse it via a web interface called WebSVN. On the source server, the WebSVN frontend is located at http://source.ggy.bris.ac.uk/websvn. You will be asked for your login information and the repositories to which you have access will be visible.

Changing login in WebSVN

The login information is cached and if for some reason you want to login as another user (myotherlogin), use the following URL: http://myotherlogin@source.ggy.bris.ac.uk/websvn