RFC: fixing issue 1153

Matt Mackall mpm at selenic.com
Mon Nov 30 16:49:41 CST 2009


On Mon, 2009-11-30 at 23:19 +0100, Sune Foldager wrote:
> I took a closer look at issue 1153, thinking I would fix it. Reading the
> RFC closely, I think we are indeed interpreting file: URIs slightly
> incorrect in Mercurial. I would like to fix it, but the problem is that
> this will in some cases mean that existing file: URIs would need to be
> changed. This is the formats the RFC supports:
> 
> 1. file:<relative or absolute path>
> 2. file:///<absolute path without leading />
> 3. file://foo/<absolute path without leading />
> 
> The 'foo' in 3 is ignored for file: URIs. Note that point 2 means that
> on Windows file:///c:/foo/bar is the correct path, not file://c:/foo/bar
> as Mercurial now supports. Note also that the currently supported
> 
> file://<relative path>
> 
> is not a valid file: URI. If I were to change this, it would cause
> problems for those paths, and for existing (incorrect) file://c:/foo/bar
> paths on Windows. On the other hand, it would implement the correct
> semantics.
> 
> In point 2 above the RFC actually doesn't specify where the paths are
> rooted, but this would be the file system root by convention at least.
> On Windows, it would normally be the "current drive", as it normal.
> 
> What are your thoughts on this?

Go ahead.

File URIs are pretty much pointless in Mercurial as we accept naked
paths. So there's no reason at all for using file URLs in the first
place and I expect MercurialEclipse is the only thing silly enough to do
so and probably doesn't make URIs of the incorrect form.

-- 
http://selenic.com : development and support for Mercurial and Linux




More information about the Mercurial-devel mailing list