You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by John Peacock <jp...@rowman.com> on 2003/12/10 18:26:00 UTC
web_dav/Apache/Subversion
A thought just occurred to me, but I have been unable to confirm or deny that it
is possible:
I'd like to (on my test server only) have Apache use the subversion repository
itself as the DocumentRoot. This would mean that the test server would not have
a WC of it's very own (that I'd have to keep updated with post_commit). The
files would be read-only (as far as Apache was concerned), so no autoversioning
issues.
It would be sweet if I could simply commit a change to the repository and have
the file immediately available to the [test] web server. This is slightly
different from enabling repository browsing within Apache. I'd like Apache to
just serve up the files directly out of Subversion, as if this were an ordinary
filesystem.
Is this possible with Subversion's DAV support???
John
--
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD 20706
301-459-3366 x.5010
fax 301-429-5748
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: web_dav/Apache/Subversion
Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
--On Wednesday, December 10, 2003 13:26:00 -0500 John Peacock
<jp...@rowman.com> wrote:
> I'd like to (on my test server only) have Apache use the subversion
> repository itself as the DocumentRoot. This would mean that the test
> server would not have a WC of it's very own (that I'd have to keep
> updated with post_commit). The files would be read-only (as far as
> Apache was concerned), so no autoversioning issues.
Sorta.
At the least, I think you'd have to use:
UseModMimePathInfo on
This allows the mod_mime filters/handlers to kick in. Otherwise, it'll
ignore it and none of your directives will be in effect. svn:mime-type
only sets the CT, but doesn't allow the filters to be inserted based on the
filename.
I think there used to be a bug in mapping the repository to /, but ISTR
that might be fixed. It shouldn't be difficult to do so.
<Location />
SVNPath /path/to/repos
</Location>
The other comment is that you'd need another <Location> block to actually
commit to. ModMimeUsePathInfo doesn't play well with DAV or DeltaV.
HTH. -- justin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: web_dav/Apache/Subversion
Posted by Edmund Horner <ed...@chrysophylax.cjb.net>.
John Peacock wrote:
> It would be sweet if I could simply commit a change to the repository
> and have the file immediately available to the [test] web server. This
> is slightly different from enabling repository browsing within Apache.
> I'd like Apache to just serve up the files directly out of Subversion,
> as if this were an ordinary filesystem.
I think the best way to do this is write a little script (in
PHP/Python/Perl/Apache module/whatever) that takes the request and maps
it onto a repository resource.
Otherwise you might have difficulty getting index.html to be used for
directories, and so on.
PHP example (/htdocs/repos.php)
<?php
/* This script is totally experimental: I typed it directly
into this e-mail message without testing.
You need somehow to get this to run for every request, e.g.:
ErrorDocument 404 /repos.php
//TODO: some other checking of arguments?
//TODO: if a directory doesn't contain index.html, you'll get a
// 404 error.
/* name is the URI requested. */
$name = $_SERVER['REQUEST_URI'];
/* if a directory is asked for, append 'index.html' (if a directory
with the trailing slash is asked for, mod_dav_svn should give a
response redirecting to the directory with a slash appended. */
if (ereg('/^, $name))
$name = $name . 'index.html';
/* internally redirect to mod_dav_svn. */
virtual ('/repos' . $name);
//TODO: return value?
?>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org