From Bioinformatics.Org Wiki
(Added "see also"; misc. fixes)
m (→See also)
|Line 77:||Line 77:|
* [[Concurrent Versions System]]
* [[Concurrent Versions System]]
Revision as of 00:49, 25 June 2008
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://bioinformatics.org/svnroot/repository[/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://bioinformatics.org/svnroot/bioworks
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.
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:
- Change your primary group affiliation to "svn" using the newgrp command (explanation).
- Use the "FSFS" filesystem type (explanation).
From your shell account on the Bioinformatics.Org server, type the following, making the necessary obvious substitution for the repository name:
$ newgrp svn $ svnadmin create --fs-type fsfs /svnroot/repository
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://firstname.lastname@example.org/svnroot/repository
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, where module is the name of the new root-level module for the repository, and username is your shell account username on the server:
$ svn import module/ svn+ssh://email@example.com/svnroot/repository[/module] -m 'message about import'
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://firstname.lastname@example.org/svnroot/bioworks/trunk -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://email@example.com/svnroot/repository[/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