RFC: fixing issue 1153

Sune Foldager cryo at cyanite.org
Mon Nov 30 16:19:07 CST 2009


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?

/Sune



More information about the Mercurial-devel mailing list