[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Subversion: existing users

From: Stefan Sperling <stsp_at_elego.de>
Date: Wed, 20 Jul 2011 12:44:57 +0200

On Wed, Jul 20, 2011 at 05:22:57PM +0700, Andy Canfield wrote:
> One quirk is that if he URL specifies direct access, e.t. svn ...
> file:///var/svn/RepoName, then where is the code which actually
> manipulates the contents of the /var/svn/RepoName directory? It must
> be hidden in svn itself, or perhaps svn forks a call to something
> like svnserve as a subtask to get the manipulations done for it,
> since there is no server program already running on the server
> computer.

See this picture for a graphical representation of the various
layers Subversion is composed of:
http://svnbook.red-bean.com/nightly/en/svn.intro.whatis.html#svn.intro.architecture
Each layer has a public API that can be used by other layers.

Clients like 'svn' and TortoiseSVN primarily use the client library's API.
The client library in turn calls into what is referred to as the "repository
access" (RA) library, which selects a repository access implementation
depending on the protocol used (http://, svn://, file://).

But there are exceptions where clients bypass the RA layer.
E.g. if you run TortoiseSVN and select the 'Create repository here'
command (the equivalent to 'svnadmin create'), TortoiseSVN calls
directly into the libsvn_repos API (the API for the big box labelled
"Subversion Repository" in the figure) to create a repository
on local disk.

Getting back to your original question, the so-called "ra_local"
repository access module (labelled "Local" in the figure) which
implements file:// access to the repository calls directly into
the libsvn_repos API to manupilate a repository on local disk.
The 'svn' client is linked to the repository access library,
and hence, indirectly, to the ra_local library and to libsvn_repos,
to support file:// URLs. So you could say that 'svn' contains a copy
of the same code that svnserve uses to access the repository. The
copy is not embedded into the 'svn' binary itself, but is loaded
from a library file (libsvn_repos.dll on Windows) when 'svn' (or
svnserve) is started.

> I read the wrong version of "The Book", the featured but obsolete
> version. I shall download the "Nightly Build" version ASAP.
>

Unfortunately google keeps showing links to the 1.1 version of the book.
This problem has existed for ages.
Received on 2011-07-20 12:45:58 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.