[issue728] hg doesn't like URLs of form file://localhost/...

Jonathan S. Shapiro shap at eros-os.com
Thu Sep 6 11:22:32 CDT 2007


On Thu, 2007-09-06 at 13:28 +0200, Christian Ebert wrote:
> * Jens Alfke on Thursday, September 06, 2007 at 06:37:46 -0000
> > The "hg" command recognizes URLs beginning with "file:///", but not ones 
> > beginning with "file://localhost/", which should be considered equivalent. 
> > Instead, it returns a "repository not found" error.
> 
> In fact "file://127.0.0.1/" or "file://::1/" might be valid as
> well.
> 
> > Unfortunately the latter, unsupported syntax is the one that's generated by Mac 
> > OS X API calls like [NSURL fileURLWithPath:].
> 
> You could try this here patch against crew.
> 
> If someone could tell me if "file://localhost/" style is accepted
> on other platforms besides darwin or not, I could try to
> implement the necessary conditionals.
> 
> c

That isn't the right question. The right question is: "is
file://machine-name/" a well-formed URL. The answer is "yes". If
machine-name does not resolve to the local machine, then the URL is
obviously not openable.
-- 
Jonathan S. Shapiro
Managing Directory
The EROS Group, LLC
www.coyotos.org, www.eros-os.org



More information about the Mercurial-devel mailing list