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

Re: UserDir for multiple repositories

From: Ryan Schmidt <subversion-2005_at_ryandesign.com>
Date: 2005-11-06 06:30:25 CET

On Nov 6, 2005, at 04:57, Mark Shead wrote:
> When using Apache and mod_dav_svn, is there anyway to specify that
> every user of the system is allowed to have a svn repository in
> their home directory that should be shared by mod_dav_svn?
> I know this can be done for Apache’s regular html sharing so /home/
> bobj/public_html is shared ashttp://server.com/~bobj/
> I’d like to be able to let users create repositories in their home
> directory that are shared. So /home/bobj/svn_repo might be shared
> as http://server.com/~bobj/svn
> Is this possible? Does anyone know where I might be able to find
> more information on doing something like this?

We tried to do something like that. We didn't entirely succeed. We
wanted to have the repositories stored centrally on disk, but still
accessible under http://www.example.com/~username/svn. We tried the

# Broken configuration for user repositories under /~username/svn
<IfModule mod_dav.c>
         RewriteEngine On
         RewriteRule ^/~([^/]+)/svn(/.*)?$ /user_svn/$1$2 [PT,L]
         <Location /user_svn>
                 DAV svn
                 SVNParentPath /data/user_svn
                 AuthType Basic
                 AuthName "User Repositories"
                 AuthLDAPURL ldap://ldap.example.com/foo
                 Require valid-user

We put all the user repositories under /data/user_svn, served 'em up
under the unpublished address http://www.example.com/user_svn/
username, and used mod_rewrite to fix the URL to http://
www.example.com/~username/svn. Some commands, like import, list and
cat, worked fine:

$ svn import foo http://www.example.com/~username/svn/foo
$ svn list http://www.example.com/~username/svn
$ svn cat http://www.example.com/~username/svn/foo/bar

Others, like export and checkout, did not:

$ svn export http://www.example.com/~username/svn
svn: REPORT request failed on '/user_svn/username/!svn/vcc/default'
svn: Unusable URI: it does not refer to this repository
$ svn checkout http://www.example.com/~username/svn
svn: REPORT request failed on '/user_svn/username/!svn/vcc/default'
svn: Unusable URI: it does not refer to this repository

In fact I meant to report this problem to the list and solicit input
but never got around to doing the requisite preliminary Google
search. I've done that now, and found no answers, so I'm reporting it
to the list now, and would be grateful if anyone can suggest a
solution, or perhaps confirm that this is a bug.

Mark, you suggest that the repository itself should be under the
user's home directory. I don't know if that's possible. The only ways
to get a repository served up are either SVNParentPath, which
requires all repositories to be in a common parent directory, or
SVNPath, which only serves up a single repository. It would be easy
to set an Apache environment variable that contains the username part
of the URL, but I don't know of a way to get that variable
substituted into the SVNPath directive.

Possibly the way to do it would be to put symlinks into the users'
home directories pointing at the real repositories within (in my
example) /data/user_svn—or maybe SVNParentPath would still work if
the real repositories were in users' home directories and /data/
user_svn contained symlinks. These suggestions do still hinge on the
"Unusable URI" error above being resolved though.

Looks like this has been observed by someone before, without solution:


If that link doesn't work, it's the second entry on this page:


I'm using Subversion 1.2.3 with Apache 2.0.54 on Gentoo Linux.

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sun Nov 6 06:32:03 2005

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.