Hosting documentation/Subversion

From Bioinformatics.Org Wiki

Jump to: navigation, search


Anonymous Subversion access

Anonymous Subversion access uses svnserve and does not require SSH.

Type the following, making the necessary obvious substitution for the repository and module names:

$ svn checkout svn://[/module] [directory]

Note that you do not need to specify the destination directory. If you are checking out a repository named "bioworks", for example, you could change to the directory where you want the repository to be placed, and then type the following:

$ svn checkout svn://

Subversion cleints

If you are using a Unix-variant, Subversion clients are easy to find or may already be installed on your system. Simply type svn to see if you have one.

For Windows, TortoiseSVN is one of the best clients and highly recommended.

Plus, Bioinformatics.Org has a Web interface for browsing and downloading source code from Subversion.

Developer access

For all developer (read/write) access, you will be using SSH (Secure Shell). The SSH (2.x or better) client must be available to your local machine. Note that you will need to type in your password for each command, unless you use ssh-agent with SSH keys. SecurityFocus has articles on generating SSH keys and setting up ssh-agent.

Creating a repository as a developer

This part requires shell access.

Important: If you want to enable anonymous downloads and access via the Web interface, you must use the following modifications to repository creation:

  1. Change your primary group affiliation to "svn" using the newgrp command (explanation).
  1. Use the "FSFS" filesystem type (explanation).

From your shell account on the Bioinformatics.Org server, type the following:

$ newgrp svn
$ svnadmin create --fs-type fsfs /svnroot/repository

where repository is the unix name of your group. If you are creating a new repository named "bioworks", for example, you would type the following:

$ newgrp svn
$ svnadmin create --fs-type fsfs /svnroot/bioworks

The next set of Subversion commands can be run from your local machine, and they will have the following form:

$ svn command svn+ssh://

Importing source code into a Subversion repository as a developer

On your local machine, change to the parent directory of the directory whose files (and subdirectories) you want to import.

Type the following:

$ svn import module/ svn+ssh://[/module] -m 'message about import'

where module is the name of the new root-level module for the repository, and username is your shell account username on the server. If, for example, your username is "jdoe", and you are importing a new module named "trunk" into the repository named "bioworks", you would type the following:

$ svn import bioworks/ svn+ssh:// -m 'Initial import.'

Conventional repositories contain trunk, branches and tags modules at the root level.

Initial checkout and other commands as a developer

Change to the directory where you want the module to be placed. (Important: This has to be a different directory from the one you used to import the module, since the module will be downloaded as a new directory with some version control files in it.) Then, type the following, making the necessary obvious substitution for the username, repository and module names:

$ svn checkout svn+ssh://[/module] [directory]

After the initial checkout, you can change into this directory and execute other Subversion commands without using the URL of the server. For example:

$ svn update
$ svn add filename
$ svn delete filename
$ svn commit

See also

External links

Personal tools
wiki navigation