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

Re: svn/url redirect question

From: Ryan Schmidt <subversion-2011a_at_ryandesign.com>
Date: Sat, 12 Mar 2011 16:42:28 -0600

On Mar 12, 2011, at 16:11, bruce wrote:

> I've got a test svn/apache setup. The location block is:
>
> <Location /aaa>
> SVNPath /apps/CollegeDir/CollegeRepository/
> SVNListParentPath On
> </Location>

SVNListParentPath is not applicable unless you are using SVNParentPath (to host multiple repositories); you're not; you're using SVNPath (to host a single repository).

> From the cmdline, the complete list of projects can be accessed via:
>
> svn list file:///apps/CollegeDir/CollegeRepository/trunk/apps/CollegeRoot

Well, that would list the contents of the CollegeRoot folder in the apps folder in the trunk folder of your repository. If that's where you've decided you're going to put all your projects, then that's a correct statement.

Note that file:///-protocol URLs should only be used for testing purposes. For production use, use a Subversion server, either svnserve or apache with mod_dav_svn.

> A single project folder/files can be seen/accessed via
>
> svn list file:///apps/CollegeDir/CollegeRepository/trunk/apps/CollegeRoot/proj1
>
> The system/svn is setup to have a number of folders that can be
> accessed if the user uses the url:
>
> http://192.168.1.1/aaa/trunk/apps/CollegeRoot/

...the aforementioned projects, yes.

> However, I'd like to have a way for the user to simply enter something
> like http://aa/project such that the httpd/apache process would
> internally insert the rest of the url to resolve to getting the
> correct repository content (folder/files).
>
> I'm not sure if this is a rewrite issue, or if so, how to accomplish it.
>
> Basically, I'm trying to have the user enter something like:
>
> http://192.168.1.1/aaa/project1
>
> And have it resolve to something like
>
> http://192.168.1.1/aaa/trunk/apps/CollegeRoot/project1
>
> If this is a mod rewrite issue, how would I implement it given that
> i'm dealing with the svn/subversion process?

If you want the projects in the repository at the paths you've indicated above, then I don't think you're going to accomplish using these shorter URLs, sorry. You cannot use mod_rewrite with Subversion; Subversion clients do not follow redirects. If you ONLY care about these shorter URLs working in a web browser, and DO NOT care about them working in a Subversion client, then you could use mod_rewrite or RedirectMatch to do it.
Received on 2011-03-12 23:43:04 CET

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.