Re: [Patch] Expression support for SVNPath and SVNParentPath
From: Graham Leggett <minfrin_at_sharp.fm>
Date: Mon, 2 Mar 2015 17:18:54 +0200
On 02 Mar 2015, at 1:25 PM, Branko Čibej <brane_at_wandisco.com> wrote:
> You may have missed my mail from a couple days ago:
I did, sorry - I’m not subscribed to the list.
>> I think this would be a nice feature to have in mod_dav_svn. It is, IMO,
Over the weekend I discovered that things aren’t that simple (or at least they are simple if you don’t want to use elements of the path in your templates, but that is quite a nasty limitation when we have SVNParentPath doing this very thing).
Two patches posted to the dev_at_httpd mailing list lift the above limitation[1][2], by providing an optional mechanism to a) pass a proper effective path to mod_dav_svn instead of the (useless) raw regular expression, and b) allow expressions to be used in this effective path so we can place dynamic elements of the uri into our template.
This allows us to do this:
<LocationMatch /svn/%{env:MATCH_PARTITIONNAME} ^/svn/(?<PARTITIONNAME>[^/]+)/>
DAV svn
</Location>
The above will map https://svn.example.com/svn/customer1/repo1 to /home/server/customer1/svn/repo1. (Explanation: customer1 has a dedicated partition, and the partition contains a number of services, including but not limited to many svn repos anchored below “svn”)
The most recent path is attached, I’ll commit it to the branch as well. I just wanted to explain the limitation and patches above before anyone reviewed it. Obviously on the httpd side documentation will be updated accordingly.
[1] http://mail-archives.apache.org/mod_mbox/httpd-dev/201503.mbox/%3c05B811A5-1B6E-4417-BC3B-172673A78817@sharp.fm%3e
Regards,
|
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.