Hosting documentation/Subversion

From Bioinformatics.Org Wiki

(Difference between revisions)
Jump to: navigation, search
m
m
Line 3: Line 3:
Anonymous Subversion access uses svnserve and does not require SSH.
Anonymous Subversion access uses svnserve and does not require SSH.
-
Type the following, making the necessary obvious substitution for the repository and module names:
+
On your local computer, type the following, making the necessary obvious substitution for the repository and module names:
  $ svn checkout <nowiki>svn://bioinformatics.org/svnroot/</nowiki>''repository''[/''module''] [''directory'']
  $ svn checkout <nowiki>svn://bioinformatics.org/svnroot/</nowiki>''repository''[/''module''] [''directory'']
Line 21: Line 21:
==Developer access==
==Developer access==
-
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].
+
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 on your local computer. 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 42: Line 42:
  $ svnadmin create --fs-type fsfs /svnroot/bioworks
  $ 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:
+
The next set of Subversion commands can be run from your local computer, and they will have the following form:
  $ svn ''command'' svn+ssh://''username''@bioinformatics.org/svnroot/''repository''
  $ svn ''command'' svn+ssh://''username''@bioinformatics.org/svnroot/''repository''
Line 52: Line 52:
==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 computer, change to the parent directory of the directory whose files (and subdirectories) you want to import.
Type the following, where ''directory'' is the directory you want to import, ''module'' is the name of the new root-level module for the repository, ''repository'' is the unix name of your group, and ''username'' is your shell account username on the server:
Type the following, where ''directory'' is the directory you want to import, ''module'' is the name of the new root-level module for the repository, ''repository'' is the unix name of your group, and ''username'' is your shell account username on the server:
Line 66: Line 66:
==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:
+
On your local computer, 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 80: Line 80:
* [[Hosting documentation/Concurrent Versions System|Concurrent Versions System]]
* [[Hosting documentation/Concurrent Versions System|Concurrent Versions System]]
 +
* [[Hosting documentation/Git|Git]]
==External links==
==External links==

Revision as of 07:23, 2 May 2013

Contents

Anonymous Subversion access

Anonymous Subversion access uses svnserve and does not require SSH.

On your local computer, 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

Subversion clients

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 on your local computer. 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).
  2. 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 computer, and they will have the following form:

$ svn command svn+ssh://username@bioinformatics.org/svnroot/repository

Important: If you want to disable anonymous downloads and access via the Web interface, you must edit /svnroot/repository/conf/svnserve.conf, and add the following line:

anon-access = none

Importing source code into a Subversion repository as a developer

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

Type the following, where directory is the directory you want to import, module is the name of the new root-level module for the repository, repository is the unix name of your group, and username is your shell account username on the server:

$ svn import directory/ 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

On your local computer, 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]

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
Namespaces
Variants
Actions
wiki navigation
Toolbox