1.0 approaches
Stephen Touset
stephen at touset.org
Fri Feb 8 10:46:17 CST 2008
On Feb 8, 2008, at 10:14 AM, Marcin Kasperski wrote:
>>> Should a more standardized sintax be used? Something like:
>>>
>>> $ hg clone ssh://myhgserver:/var/lib/hg/myrepo
>
> Indeed it would be more natural.
Unfortunately, it would no longer be a URI[1]. Colons separate the
port from the hostname. This suggestion would obliterate the ability
to use a repository on a non-canonical SSH port, and likely require a
totally custom URI library that breaks compatibility with damn near
anything else.
The existing syntax works, and makes sense from an intuitive
perspective. With a URI of ssh://user@host:port/path, path refers to a
relative location from the current working directory. If you want to
use an absolute path, do what you normally do and add a preceding slash.
>> The colon is already used to specify the port.
>
> Checking whether the first character after colon is digit, or not,
> is not that impossible...
That's beside the point. It's a standard. There's an RFC. Hundreds of
URI parsing libraries exist, and breaking compatibility with virtually
every single one is simply not a reasonable option.
>> This is all moot anyway. It's rather late in the game to change them,
>> especially for so little benefit.
>
> The confusion is fairly frequent. And the change need not be invasive,
> old convention may be still handled....
This would cause even more confusion, given that no other URI on the
planet uses it. Again, the old way isn't a "convention". It's a
documented standard.
1. http://www.ietf.org/rfc/rfc2396.txt
--
Stephen Touset
stephen at touset.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1580 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial/attachments/20080208/3d386b1d/attachment.bin
More information about the Mercurial
mailing list