You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Robert Leftwich <ro...@leftwich.info> on 2003/07/18 23:59:44 UTC
Using Apache handlers with Subversion
I'm doing some playing around with Subversion running with Apache and I'd
like to be able to use a handler (written in mod_python) for formatting
certain files in the Subversion repository. A stripped down version of the
config I am using successfully with a standard file system DAV is as follows:
<Location /fs-dav>
AddHandler python-program cpp
PythonHandler cpp-formatter
Options +MultiViews
MultiviewsMatch Handlers
Dav On
</Location>
If I try the same thing in my svn location the handler never gets called
(but the svn location is working correctly in all other respects).
<Location /svn-dav>
AddHandler python-program cpp
PythonHandler cpp-formatter
Options +MultiViews
MultiviewsMatch Handlers
DAV svn
SVNPath "/svn"
SVNAutoversioning on
</Location>
Is there an explanation and/or work-around for this?
Robert
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Using Apache handlers with Subversion
Posted by Barry Pederson <bp...@barryp.org>.
Ben Collins-Sussman wrote:
> Robert Leftwich <ro...@leftwich.info> writes:
>
>
>>If I try the same thing in my svn location the handler never gets
>>called (but the svn location is working correctly in all other
>>respects).
>
> I think the handlers only work on "real" files, not imaginary files.
> mod_dav_svn is serving up data from BDB in such a way as to circumvent
> the handlers. Someone who knows more about apache can explain.
Would an output-handler work with Subversion? mod_python can support
those, but you'd have to alter your Python cpp-formatter a bit. (Is
"cpp-formatter" really the name of your Python handler? I didn't think
Python module names could have '-' in them.)
Barry
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Using Apache handlers with Subversion
Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
--On Friday, July 18, 2003 9:33 PM -0500 Ben Collins-Sussman
<su...@collab.net> wrote:
> I think the handlers only work on "real" files, not imaginary files.
> mod_dav_svn is serving up data from BDB in such a way as to circumvent
> the handlers. Someone who knows more about apache can explain.
Almost, but not quite. =)
The default handler in httpd will deliver a file down the pipe. However,
handlers can not be chained together - only one can be used per request.
mod_dav's handlers (which invoke mod_dav_svn's DAV hooks) service all of the
operations on the repository - for a GET request, the mod_dav handlers push
down the file data from the repository. (Note that the lack of chaining
handlers is why PHP and Subversion can't work together on the same location.)
However, output filters are what you'd want if you want to manipulate the data
in an abstract way. They can be chained on a request and are independent of
its data source. Take a look at mod_deflate or mod_include for examples of
filters. mod_python should support registration of filters, but I'm not aware
of those semantics off the top of my head. You'd have to be introduced to the
wonderful world of buckets and brigades... -- justin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Using Apache handlers with Subversion
Posted by Ben Collins-Sussman <su...@collab.net>.
Robert Leftwich <ro...@leftwich.info> writes:
> If I try the same thing in my svn location the handler never gets
> called (but the svn location is working correctly in all other
> respects).
>
> <Location /svn-dav>
> AddHandler python-program cpp
> PythonHandler cpp-formatter
> Options +MultiViews
> MultiviewsMatch Handlers
> DAV svn
> SVNPath "/svn"
> SVNAutoversioning on
> </Location>
>
> Is there an explanation and/or work-around for this?
I think the handlers only work on "real" files, not imaginary files.
mod_dav_svn is serving up data from BDB in such a way as to circumvent
the handlers. Someone who knows more about apache can explain.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org