Hosting documentation/Subversion

From Bioinformatics.Org Wiki

(Difference between revisions)
Jump to: navigation, search
m
m
Line 1: Line 1:
-
Anonymous Subversion access
+
==Anonymous Subversion access==
Anonymous Subversion access uses svnserve and does not require SSH.
Anonymous Subversion access uses svnserve and does not require SSH.
Line 10: Line 10:
  $ svn checkout svn://bioinformatics.org/svnroot/bioworks
  $ svn checkout svn://bioinformatics.org/svnroot/bioworks
-
Subversion cleints
+
==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.
+
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, TortoiseSVN is one of the best clients and highly recommended.
Line 18: Line 18:
Plus, Bioinformatics.Org has a Web interface for browsing and downloading source code from Subversion.
Plus, Bioinformatics.Org has a 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 (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
+
==Creating a repository as a developer==
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 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 (explanation).
2. Use the "FSFS" filesystem type (explanation).
2. Use the "FSFS" filesystem type (explanation).
Line 44: Line 44:
  $ svn command svn+ssh://username@bioinformatics.org/svnroot/repository
  $ svn command svn+ssh://username@bioinformatics.org/svnroot/repository
-
Importing source code into a Subversion repository as a developer
+
==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.
* On your local machine, change to the parent directory of the directory whose files (and subdirectories) you want to import.
Line 57: Line 57:
Conventional repositories contain trunk, branches and tags modules at the root level.
Conventional repositories contain 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==
-
* 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:
+
* 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://username@bioinformatics.org/svnroot/repository[/module] [directory]
  $ svn checkout svn+ssh://username@bioinformatics.org/svnroot/repository[/module] [directory]
Line 70: Line 70:
  $ svn commit
  $ svn commit
-
Additional references
+
==Additional references==
* Version Control with Subversion (a free book)
* Version Control with Subversion (a free book)
* CVS to SVN Crossover Guide
* CVS to SVN Crossover Guide
* Subversion Quick Reference (PostScript)
* Subversion Quick Reference (PostScript)

Revision as of 22:44, 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