1

We currently have a subversion server at svn.company.com for internal (and occasionally external) use. Currently, the repositories are located at /svn/[project] via SVNParentPath. However, management wants to make them also available at just /[project]. I was able to get it seemingly working with some mod_rewrite directives:

#Don't redirect (internally, note the PT (passthrough)) any trac or admin pages 
RewriteCond %{REQUEST_URI} !^/trac.*$
RewriteCond %{REQUEST_URI} !^/admin.*$
RewriteCond %{REQUEST_URI} !^/svn.*$
RewriteRule ^/(.*)$ /svn/$1 [PT,NS,QSA]

This seems to work, but fails when checking out or performing any other actual SVN operations. My theory is that DAV reports its URL as /svn/[project], and the client aborts when this doesn't match its requested url of /[project].

How would you solve this?

Mark
  • 121
  • 3
  • Let me guess; a 301 in response to the PROPFIND? – Shane Madden May 27 '11 at 18:23
  • Actually, no. A 500 in response to REPORT. The server complains "Unusable URI: it does not refer to this repository" when the client sends the XML entitty S:src-path as "http://svn.company.com/[project]/trunk" in the REPORT request. Ironically, the client is sending the to the svn.company.com/svn/[project]/!svn/vcc/default URI, so its all kind of confused! I think this problem is unsolvable without a more intelligent DAV implementation or a proxy application that can modify the requests themselves. – Mark May 30 '11 at 17:48

1 Answers1

0

Could you not just use both things?

<Location "/">
....setup for management
SVNParentPath /path/to/repos
</Location>

<Location "/svn">
...stuff for /svn/project
SVNParentPath /path/to/repos
</Location>
evildead
  • 892
  • 5
  • 11