Slawek and Piotr,
I am not an expert on the subject of URLs, but I think there is a lot of confusion here.
From what I know, in URLs the first part is <protocol_name>://. Where <protocol_name> is e.g. http, https, ssh, and file. the protocol name should be separated from the rest of the URL with ://. So, I think of the "file://" part of the URL, as the "protocol part". The rest of the URL starts from there. Does this make sense?
So, file:///Users/amazkovoi/src/atlassian/fe-hg is a correct URL. Where "file://" is the protocol part, and "/Users/amazkovoi/src/atlassian/fe-hg" is the absolute path to the repository.
The URL is actually a short form of file://localhost/Users/amazkovoi/src/atlassian/fe-hg
The file://localhost/Users/amazkovoi/src/atlassian/fe-hg URL explicitly specifies the hostname, which is "localhost", and then it shows the absolute path, which is "/Users/amazkovoi/src/atlassian/fe-hg".
With the "file://" protocol, "localhost" is the default host. It looks like hg ignores the hostname even if it is part of the URL and assumes localhost.
So for me all of the following URLs worked:
- file:///Users/amazkovoi/src/atlassian/fe-hg
- file://localhost/Users/amazkovoi/src/atlassian/fe-hg
- file://blah/Users/amazkovoi/src/atlassian/fe-hg
Of course, I have a Hg repo at the /Users/amazkovoi/src/atlassian/fe-hg path on my machine.
Also, the "hg help urls" command on Mac for Hg version:
Mercurial Distributed SCM (version 1.6.4+20101001)
Is correct. It only talks about the file://local/filesystem/path[#revision] URLs form, which works fine, and as far as I know is perfectly allowed by the URL RFC.
Please let me know if you think I am wrong about something here.
Cheers,
Anton
Indeed, the RFC-1738 does not mention the file:/path (single slash) as valid, although it does seem to work as expected. It is compatible with RFC-3986 uri syntax, though.
To sum up:
I'm closing this isse as "invalid"