##// END OF EJS Templates
vcs: Use a thread scoped cache invalidation context to cache repository objects....
vcs: Use a thread scoped cache invalidation context to cache repository objects. Without this change the cache is on a process scope. If running with multiple threads this leads to sharing the cached object between threads. This will cause exceptions if multiple threads are trying to access the same curl object. Even worse it allows multiple threads to operate on the same repository object concurrently.

File last commit:

r388:e4a43c7f default
r614:cbe55781 default
Show More
svn-http.rst
84 lines | 2.3 KiB | text/x-rst | RstLexer

|svn| With Write Over HTTP

To use |svn| with write access, the currently supported method is over HTTP. This requires you to configure your local machine so that it can access your |RCE| instance.

Prerequisites

  • Enable lab setting on your |RCE| instance, see :ref:`lab-settings`.
  • You need to install the following tools on your local machine: Apache and mod_dav_svn. Use the following Ubuntu as an example.
$ sudo apt-get install apache2 libapache2-mod-svn

Once installed you need to enable dav_svn:

$ sudo a2enmod dav_svn

Configuring Apache Setup

Tip

It is recommended to run Apache on a port other than 80, due to possible conflicts with other HTTP servers like nginx. To do this, set the Listen parameter in the /etc/apache2/ports.conf file, for example Listen 8090

It is also recommended to run apache as the same user as |RCE|, otherwise permission issues could occur. To do this edit the /etc/apache2/envvars

export APACHE_RUN_USER=ubuntu
export APACHE_RUN_GROUP=ubuntu
  1. To configure Apache, create and edit a virtual hosts file, for example :file:`/etc/apache2/sites-available/default.conf`, or create another virtual hosts file and add a location section inside the <VirtualHost> section.
<Location />
    DAV svn
    # Must be explicit path, relative not supported
    SVNParentPath /PATH/TO/REPOSITORIES
    SVNListParentPath On
    Allow from all
    Order allow,deny
</Location>

Note

Once configured, check that you can see the list of repositories on your |RCE| instance.

  1. Go to the :menuselection:`Admin --> Settings --> Labs` page, and enable :guilabel:`Proxy Subversion HTTP requests`, and specify the :guilabel:`Subversion HTTP Server URL`.

Using |svn|

Once |svn| has been enabled on your instance, you can use it using the following examples. For more |svn| information, see the Subversion Red Book

# To clone a repository
svn checkout http://my-svn-server.example.com/my-svn-repo

# svn commit
svn commit