Repository Changes

I don't suppose anyone other than myself is actively using them, but this is just as heads up that I've changed the paths on which all my Subversion repositories are served on at dev.stuconnolly.com. Previously all repositories were accessiable at the top level of the domain, for example:

http://dev.stuconnolly.com/<repository_name>/

I've now moved them down a level to get around some issues that were bugging me and are now accessible via:

http://dev.stuconnolly.com/svn/<repository_name>/

The things that were bugging me were the problems that arise when attempting to use Apache's mod_rewrite for URL re-writing with repositories installed on the domain. If you've ever setup a repository to be HTTP accessible then your probably aware that it doesn't exactly act like a normal directory on disk and so re-writing URLs that include conditions to check if the requested file or directory actually exists doesn't have the expected result. Hence changiing the URL on which the repositories are served on means I can catch these requests in my .htaccess file containing all my URL re-writing rules using the following as the very first entry:

RewriteCond %{REQUEST_URI} ^/svn/.*$
RewriteRule ^(.*)$ - [L]

Which basically prevents any other rules after this one being applied if the URL begins with /svn/.

Also, I've enabled repository access via the svn:// protocol in addition to HTTP, so all repositories can now be accessed using:

svn co svn://dev.stuconnolly.com/svn/<repository_name>/ <directory_name>

Probably a bit more than anyone really needed to know but hopefully it will be useful to someone out there and its also a good example of what happens when I get bored and start messing about with things.

Posted June 19th, 2008