[PATCH] Accept file://localhost/ style urls as local

Jonathan S. Shapiro shap at eros-os.com
Sun Sep 9 00:05:20 CDT 2007


On Sat, 2007-09-08 at 23:30 +0200, Christian Ebert wrote:
> * Jonathan S. Shapiro on Saturday, September 08, 2007 at 10:23:33 -0400
> > On Sat, 2007-09-08 at 09:24 +0200, Christian Ebert wrote:
> >> MacOS X' sanity is rather limited:
> > 
> > Since when is this news?
> 
> Apart from that, I'm curious about an example where simply
> dropping the local host component (which is done in case it's
> empty already for file:///..., or probably would have to done if
> it's valid) would lead to a different or dangerous result, not
> from a puristic, but practical Hg point of view.

Syntactic nit: that would be file:/path. If the leading characters after
the scheme are not //, then no host is present.

To answer your question, here is a practical example:

OpenCM never got our network connection stuff working satisfactorily.
More accurately: we never got GC debugged correctly. We ended up with
many repositories at /home/OPENCM. These were named by file: URIs.

It was pretty easy to attempt a commit in the wrong place. This would
fail, but mysteriously. When we added the code to "check host name if
present in scheme", a lot of mysteries went away.

shap



More information about the Mercurial-devel mailing list