From: Felipe Contreras Date: Fri, 09 Aug 2013 21:55:13 GMT Subject: Re: [PATCH] remote-hg: fix path when cloning with tilde expansion Message-ID: In-Reply-To: On Fri, Aug 9, 2013 at 4:19 PM, Antoine Pelisse wrote: > Confusion everywhere :-) > > On Fri, Aug 9, 2013 at 10:53 PM, Junio C Hamano wrote: >> Antoine Pelisse writes: >> >>> So when we run: >>> >>> git clone hg::~/my/repo >>> >>> Git will remove the "hg::" part, and Mercurial will expand tilde and >>> clone $HOME/my/repo. >> >> Now you confused me. If the implementation were for us to remove >> the hg:: prefix and let Mercurial do whatever it wants to do with >> the rest, you are right that we will not have to do any expansion >> like your patch. But you sent a patch to do so, so apparently it >> is not what happens. So where does it go wrong? >> >> Puzzled... > > OK, I think I see why you are puzzled. > > Cloning works fine because we "fix the path" *after* the clone is done > successfully, for the following reason: So if we didn't store a different path, it would work. So instead of expanding '~' ourselves, it would be better to don't expand anything, and leave it as it is, but how to detect that in fix_path()? -- Felipe Contreras