[PATCH 1 of 1] url: added support for scp/rsync style URLs for ssh

Mads Kiilerich mads at kiilerich.com
Wed Apr 6 09:13:14 CDT 2011


On 04/06/2011 03:36 PM, Thomas Arendsen Hein wrote:
> # HG changeset patch
> # User Sascha Wilde<wilde at intevation.de>
> # Date 1302096161 -7200
> # Node ID 62833deea9f05f44021b401c8093ea86212ac197
> # Parent  375872fdadba7266eced67c85e57ffda26fa7500
> url: added support for scp/rsync style URLs for ssh
>
> URLs in the form<user>@<host>:<path>  are normalized to the
> default format: ssh://<user>@<host>/<path>
>
> This breaks the generic "just a scheme and a path" behavior of url.py,
> but as it wasn't used by Mercurial (and there always used to be
> exceptions) anyway it shouldn't be to much of a loss.  So the removed
> corresponding tests were removed.

I don't think this is a good idea.

ssh works fine with Mercurial, but it is neither deeply integrated nor 
the default. The syntax that is nice for ssh itself is thus not the 
right one to use here.

We currently have a collision between single-letter schemes and windows 
drive letters, but schemes are quite static so that isn't a problem. A 
collision between drive letters and singe-letter hostnames would be more 
problematic.

I don't think we should have more guessing. Explicit is better than 
implicit.

What we have now is pretty much standard URL syntax. I don't think we 
should add more exceptions.

/Mads


More information about the Mercurial-devel mailing list