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

RE: Handling http:// when you really want svn://

From: Clyde Jones <cjones_at_exelixis.com>
Date: Fri, 29 May 2009 22:57:41 -0700

----Original Message----
From: Ryan C. Gordon [mailto:icculus_at_icculus.org]
Sent: Friday, May 08, 2009 11:09 AM
To: users_at_subversion.tigris.org
Subject: Handling http:// when you really want svn://

> So my server has a virtual host, svn.icculus.org ...
>
> svn://svn.icculus.org/ goes to the Subversion daemon, and
> http://svn.icculus.org/ goes to viewvc.
>
> Besides the protocol, the basic URLs are the same: svn://blah/Project
> gets you Project repository, and http://blah/Project gets you a
> human-friendly webview of Project.
>
> The problem I'm running into is that people don't read carefully, or
> have muscle memory to type "http" for URLs, or maybe just assume the
> web view will map for a Subversion client the way that Mercurial
> does.
>
> Many, many people have emailed me to tell me that "subversion is
> broken"
> when they get things like this...
>
> $ svn ls http://svn.icculus.org/duke3d
> svn: Repository moved permanently to '/duke3d/'; please relocate
>
> ...when in fact, the problem is that they're using the wrong URL, and
> talking to Apache without Subversion (or even WebDAV) support.
>
> What's the best way to deal with this scenario? Ideally, I'd like the
> svn client to realize that this server doesn't support PROPFIND and
> tell the user "maybe you meant 'svn://blah/Project'?" or something,
> but I'm not sure what's involved in that magic, or if there are
> better approaches I could be taking on the server side.
>
> Thanks,
> --ryan.
>

Hi
 To answer your question, you can use mod-rewrite[1] to redirect
browsers of specific types, so you should be able to build a rule that
will send an error page or an error message back that says "wrong place,
check out using svn://repo"

The subversion command line client identifies itself as "SVN/1.5.4
(r333333) neon/0.28.2" and TortoiseSVN is "SVN/1.5.5
(r333333)/TortoiseSVN-1.5.7.15182 neon/0.28.3" or something like that.

You could also use the virtual host in apache to have
http://viewvc.icculus.org be your viewvc installation and let your users
actually use the http://svn.icculus.org url for subversion. Configuring
your repository to allow both forms of access is fairly easy.

HTH

Clyde

[1] http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html search for
User-Agent

-- 
Clyde Jones
R&D Informatics
Senior Operations Developer
Exelixis Inc
This email (including any attachments) may contain material
that is confidential and privileged and is for the sole use of
the intended recipient. Any review, reliance or distribution by
others or forwarding without express permission is strictly
prohibited. If you are not the intended recipient, please
contact the sender and delete all copies.
Exelixis, Inc. reserves the right, to the extent and under
circumstances permitted by applicable law, to retain, monitor
and intercept e-mail messages to and from its systems.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2357074
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-05-30 07:58:43 CEST

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.