Difference between revisions of "Subversion"

From OSGeo
Jump to navigation Jump to search
(Copy from migration document.)
 
(add notes on adding/removing users.)
Line 1: Line 1:
= Subversion =
+
OSGeo maintains a set of subversion services, currently hosted on the primary Peer1 server at the virtual host http://svn.osgeo.org/.  Subversion access is authenticated based on [http://www.osgeo.org/osgeo_userid OSGeo Userids] and each project has a committer list also maintained in LDAP.  Excellent general information on subversion is available from the [http://svnbook.red-bean.com/nightly/en/index.html Subversion Book].
[http://svnbook.red-bean.com/nightly/en/index.html Subversion Book]
+
 
=== Creating a repository ===
+
= Administration =
 +
 
 +
Howard Butler (hobu), and Shawn Barnes (sbarnes) are the primary contacts for Subversion administration issues.  Requests can be submitted via the [http://trac.osgeo.org/osgeo/newticket SAC Trac].
 +
 
 +
== Add/Remove Committer ==
 +
 
 +
Any member of a subversion committer group and add and remove members to the commiter group at an url of the following form, with the project name substituted for gdal.  [http://www.osgeo.org/osgeo_userid  OSGeo Userids] has details on finding or creating OSGeo userids.
 +
 
 +
  https://www.osgeo.org/cgi-bin/auth/ldap_edit.py?group=gdal
 +
 
 +
== Creating a repository ==
 +
 
 +
By root on main server:
 
   $ sudo mkdir /var/www/svn/repos/<repo_name>
 
   $ sudo mkdir /var/www/svn/repos/<repo_name>
 
   $ sudo svnadmin /var/www/svn/repos/<repo_name>
 
   $ sudo svnadmin /var/www/svn/repos/<repo_name>
 
   $ sudo chown -R apache:apache /var/www/svn/repos/<repo_name>
 
   $ sudo chown -R apache:apache /var/www/svn/repos/<repo_name>
  
=== Loading a repository from a dumpfile ===
+
== Loading a repository from a dumpfile ==
 +
 
 +
By root on main server:
 
   $ sudo svnadmin load /var/www/svn/repos/<repo_name> < /path/to/dumpfile
 
   $ sudo svnadmin load /var/www/svn/repos/<repo_name> < /path/to/dumpfile
 
   $ sudo chown -R apache:apache /var/www/svn/repos/<repo_name>  
 
   $ sudo chown -R apache:apache /var/www/svn/repos/<repo_name>  
  
=== Dumping a repository ===
+
== Dumping a repository ==
 +
 
 +
By root on main server:
 
   $ sudo svnadmin dump /var/www/svn/repos/<repo_name> > dumpfile
 
   $ sudo svnadmin dump /var/www/svn/repos/<repo_name> > dumpfile
  
=== Recovering / unlocking repository ===
+
== Recovering / unlocking repository ==
 
* subversion may lock if user ctl-c during checkout or checkout is interupted with an apache restart
 
* subversion may lock if user ctl-c during checkout or checkout is interupted with an apache restart
 
* Need policy on who to contact and who can run 'svnadmin recover' as
 
* Need policy on who to contact and who can run 'svnadmin recover' as

Revision as of 06:06, 27 April 2007

OSGeo maintains a set of subversion services, currently hosted on the primary Peer1 server at the virtual host http://svn.osgeo.org/. Subversion access is authenticated based on OSGeo Userids and each project has a committer list also maintained in LDAP. Excellent general information on subversion is available from the Subversion Book.

Administration

Howard Butler (hobu), and Shawn Barnes (sbarnes) are the primary contacts for Subversion administration issues. Requests can be submitted via the SAC Trac.

Add/Remove Committer

Any member of a subversion committer group and add and remove members to the commiter group at an url of the following form, with the project name substituted for gdal. OSGeo Userids has details on finding or creating OSGeo userids.

 https://www.osgeo.org/cgi-bin/auth/ldap_edit.py?group=gdal

Creating a repository

By root on main server:

  $ sudo mkdir /var/www/svn/repos/<repo_name>
  $ sudo svnadmin /var/www/svn/repos/<repo_name>
  $ sudo chown -R apache:apache /var/www/svn/repos/<repo_name>

Loading a repository from a dumpfile

By root on main server:

  $ sudo svnadmin load /var/www/svn/repos/<repo_name> < /path/to/dumpfile
  $ sudo chown -R apache:apache /var/www/svn/repos/<repo_name> 

Dumping a repository

By root on main server:

  $ sudo svnadmin dump /var/www/svn/repos/<repo_name> > dumpfile

Recovering / unlocking repository

  • subversion may lock if user ctl-c during checkout or checkout is interupted with an apache restart
  • Need policy on who to contact and who can run 'svnadmin recover' as

priviledged access is needed (may need to stop/start apache to drop requests to repository before recover)

Subversion was upgraded to version 1.4.3 (30 Jan. 2007) to reduce the repository locking problem if ctl-c used to end a checkout.

If the repository locks the following command should be used to recover the repository:

  $ sudo svnadmin --wait recover /var/www/svn/repos/<repo_name>
  $ sudo chown -R apache:apache /var/www/svn/repos/<repo_name>

In most cases this will work in the odd case that you are waiting a very long time for the command to run then apache may have to be restarted to drop anything accessing the repository and preventing the repository from being recovered

  $ sudo /sbin/service httpd restart
  $ sudo svnadmin --wait recover /var/www/svn/repos/<repo_name>
  $ sudo chown -R apache:apache /var/www/svn/repos/<repo_name>