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

Re: [Patch] Expression support for SVNPath and SVNParentPath

From: Branko Čibej <brane_at_e-reka.si>
Date: Tue, 13 Nov 2018 17:50:26 +0100

On 2015/02/25 17:35:57, Graham Leggett <minfrin_at_sharp.fm> wrote:
> Hi all,
> The SVNParentPath directive allows a set of repos to be placed at an
URL, but if you have more complex needs such as providing many customers
(with separately mounted home directories) access to many repositories,
this may not be enough.
> The attached patch brings httpd v2.4 expression support to the SVNPath
and SVNParentPath directories through the addition of an optional second
parameter, which allows you to do stuff like this:
> <LocationMatch ^/svn/(?<CUSTOMERNAME>[^/]+)/>
> # customer has their own partition, inside is an “svn” directory with
repos in it
> SVNParentPath /home/partition %{env:MATCH_CUSTOMERNAME}/svn
> # customer repos are protected by this group
> require ldap-group
> </LocationMatch>

I'm trying to resurrect this branch and have hit a bit of a snag. I
modified the HTTPd configuration we use for our automated tests so that
it uses a LocationMatch with a match group and a suffix expression in
SVNParentPath. However, the server is now crashing because
dav_svn__get_root_dir() no longer returns a valid path.

The configuration looks like this:

<LocationMatch "^/svn-test-work/(?<REPOSITORIES>repositories)">
  DAV svn
  SVNParentPath "/dev/subversion/tests/cmdline/svn-test-work" "%{env:MATCH_REPOSITORIES}"

and the parent path appears to be computed correctly, however,
dav_svn__get_root_dir() is returning the actual regular expression from
the LocationMatch line, i.e., it's returning


instead of


which is the actual matched location, so of course later on
svn_fspath__join() asserts because the former is not a canonical path.

Graham, I presume that you tested this when you committed the original
patch ... would you mind taking a look at the current code on the
mod-dav-svn-locations branch? I don't think I changed anything
significant when I was reworking the code, and I'm a bit lost in the
expression stuff.

This is the current diff from trunk:

svn diff  http://svn.apache.org/repos/asf/subversion/trunk@r1846487 \

(I pegged the trunk revision because that's when the latest merge to the
branch was made.)

-- Brane
Received on 2018-11-13 17:50:40 CET

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

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