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

Make part of repository visible via Apache?

From: John Aldridge <john.aldridge_at_informatix.co.uk>
Date: 2007-12-04 20:03:59 CET

We run Apache as a web server for internal company material. One of the
things it serves is a URL

    http://www/Documents

which is currently an ordinary folder in the Apache DocumentRoot folder
whose contents (mostly html files) are populated by checking out the
"trunk/Documents" subtree of our repository.

This has two disadvantages:

a) Anyone who updates a document needs to remember to do an "svn update"
in order to make the updated document visible, and

b) It's a waste of disk (& backup tape) space.

I wondered whether mod_dav_svn could be used to solve both of these
problems by having Apache serve a direct view onto the repository, so I
loaded the mod_dav and mod_dav_svn modules and added

<Location /Documents>
   DAV svn
   SVNPath d:/svn-repos
</Location>

to the Apache config file. This worked, kind of, but has a number of
problems which make it less than ideal

a) I can't find a way of making the URL http://www/Documents show the
contents of just "/trunk/Documents", rather than the repository root
folder. This will break any existing links on other pages. The nearest I
have to a solution is to serve the entire repository as /svn and add a

    Redirect /Documents http://www/svn/trunk/Documents

directive. This isn't ideal, though, as I'd rather preserve the myth
that these documents really do live in /Documents.

b) I have no wish to allow write access to the repository via Apache
(that's done by a service running svnserve). Is there a simple way of
configuring mod_dav_svn to be readonly, short of configuring
authentication and access control options.

c) $Revision$ and $Date$ keywords are not expanded in the displayed
documents. Not a critical deficiency, but a pity.

I'd welcome any hints for solving these problems, or suggestions for a
better way to solve the underlying problem.

-- 
Thanks,
John
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Dec 4 20:04:36 2007

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.