You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Ryan C. Gordon" <ic...@icculus.org> on 2009/05/08 18:09:18 UTC

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.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2117788

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

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

Posted by Ryan Schmidt <su...@ryandesign.com>.
On May 8, 2009, at 16:18, Andrey Repin wrote:

> There's nothing wrong, really. Subversion built to be used with  
> http://
> access, svn:// is just a fallback for those who can't use Apache.

That's not accurate. Subversion can be served over apache or using  
svnserve (or both simultaneously if desired). Neither one is  
necessarily preferable to the other. There are advantages and  
disadvantages to each. Broadly, svnserve is usually faster but apache  
offers more features. But it is not correct that apache is somehow  
the official way of serving a repository and that svnserve is an  
afterthought.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2122495

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

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

Posted by Andrey Repin <an...@freemail.ru>.
Greetings, Ryan C. Gordon!

> 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

This is known issue and i've found a way around it. Search in archive.

> ...when in fact, the problem is that they're using the wrong URL, and 
> talking to Apache without Subversion (or even WebDAV) support.

There's nothing wrong, really. Subversion built to be used with http://
access, svn:// is just a fallback for those who can't use Apache.

> 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.

Better is, yeah, let Subversion run on http:// and install viewvc somewhere
else.


--
WBR,
 Andrey Repin (anrdaemon@freemail.ru) 09.05.2009, <1:14>

Sorry for my terrible english...

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2122371

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

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

Posted by Clyde Jones <cj...@exelixis.com>.
----Original Message----
From: Ryan C. Gordon [mailto:icculus@icculus.org]
Sent: Friday, May 08, 2009 11:09 AM
To: users@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@subversion.tigris.org].