1.0 approaches

Matt Nordhoff mnordhoff at mattnordhoff.com
Fri Feb 8 08:16:50 CST 2008


Martin Marques wrote:
> Also, I noticed something that was quite annoying: When I clone from a
> centralized copy via ssh I have to add a second backslash at the
> beginning of the PATH:
> 
> $ hg clone ssh://myhgserver//var/lib/hg/myrepo
> 
> Should a more standardized sintax be used? Something like:
> 
> $ hg clone ssh://myhgserver:/var/lib/hg/myrepo
> 
> Just a thought.

Without the second slash, the path is relative to your homedir:

$ hg clone ssh://myhgserver/hg/myrepo

translates to "/home/myuser/hg/myrepo". You have to add the second slash
to make it relative to the server root.

I really like that hg supports that, and I like the implementation too,
even though it's non-obvious, because it's so simple.

The URLs may not be standard SSH URLs, but they are standard URLs/URIs
(like used by HTTP). The colon is already used to specify the port.

Also, hg (mostly?) uses the standard Python urlparse module for parsing
URLs, which doesn't support your proposal.

This is all moot anyway. It's rather late in the game to change them,
especially for so little benefit.
-- 


More information about the Mercurial mailing list