Hosting documentation/Subversion

From Bioinformatics.Org Wiki

(Difference between revisions)
Jump to: navigation, search
m
m
Line 14: Line 14:
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.
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.
+
For Windows, [http://tortoisesvn.tigris.org/ 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.
+
Plus, Bioinformatics.Org has a [http://www.bioinformatics.org/websvn/ Web interface] for browsing and downloading source code from Subversion.
==Developer access==
==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.
+
For all developer (read/write) access, you will be using SSH ([http://www.ssh.com/ 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 [http://www.securityfocus.com/infocus/1810 generating SSH keys] and setting up [http://www.securityfocus.com/infocus/1812 ssh-agent].
==Creating a repository as a developer==
==Creating a repository as a developer==
Line 26: Line 26:
This part requires shell access.
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:
+
* '''Important''': If you want to enable anonymous downloads and access via the [http://www.bioinformatics.org/websvn/ 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. Change your primary group affiliation to "svn" using the '''newgrp''' command ([http://svnbook.red-bean.com/en/1.1/svn-book.html#svn-ch-6-sect-5 explanation]).
-
2. Use the "FSFS" filesystem type (explanation).
+
2. Use the "FSFS" filesystem type ([http://svnbook.red-bean.com/en/1.1/ch05.html#svn-ch-5-sect-1.3 explanation]).
* From your shell account on the Bioinformatics.Org server, type the following, making the necessary obvious substitution for the repository name:
* From your shell account on the Bioinformatics.Org server, type the following, making the necessary obvious substitution for the repository name:
Line 55: Line 55:
  $ svn import bioworks/ svn+ssh://jdoe@bioinformatics.org/svnroot/bioworks/trunk -m 'Initial import.'
  $ svn import bioworks/ svn+ssh://jdoe@bioinformatics.org/svnroot/bioworks/trunk -m 'Initial import.'
-
Conventional repositories contain trunk, branches and tags modules at the root level.
+
Conventional repositories contain [http://svnbook.red-bean.com/en/1.1/ch05s04.html#svn-ch-5-sect-6.1 trunk, branches and tags modules] at the root level.
==Initial checkout and other commands as a developer==
==Initial checkout and other commands as a developer==
Line 72: Line 72:
==Additional references==
==Additional references==
-
* Version Control with Subversion (a free book)
+
* [http://svnbook.red-bean.com/ Version Control with Subversion] (a free book)
-
* CVS to SVN Crossover Guide
+
* [http://svn.collab.net/repos/svn/trunk/doc/user/cvs-crossover-guide.html CVS to SVN Crossover Guide]
-
* Subversion Quick Reference (PostScript)
+
* [http://subversion.tigris.org/files/documents/15/177/svn-ref.ps Subversion Quick Reference] (PostScript)

Revision as of 22:51, 24 March 2008

Contents

Anonymous Subversion access

Anonymous Subversion access uses svnserve and does not require SSH.

$ 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

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.

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

2. Use the "FSFS" filesystem type (explanation).

$ 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://username@bioinformatics.org/svnroot/repository

Importing source code into a Subversion repository as a developer

$ svn import module/ svn+ssh://username@bioinformatics.org/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://jdoe@bioinformatics.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

$ svn checkout svn+ssh://username@bioinformatics.org/svnroot/repository[/module] [directory]
$ svn update
$ svn add filename
$ svn delete filename
$ svn commit

Additional references

Personal tools
Namespaces
Variants
Actions
wiki navigation
Toolbox