From: Junio C Hamano Date: Wed, 24 Jul 2013 22:51:58 GMT Subject: Re: [PATCH] [SIGNED-OFF] remotes-hg: bugfix for fetching non local remotes Message-ID: <7vhafj606p.fsf@alter.siamese.dyndns.org> In-Reply-To: <665576E7-6083-4535-9CE0-773236A0E9ED@joernhees.de> Jörn Hees writes: > On 24 Jul 2013, at 17:20, Junio C Hamano wrote: > >> Goes and looks... >> >> OK, the tracking branches for these are created under refs/hg/* >> using the same name. >> ... >> A refname shouldn't begin or end with a dot, because the range >> ... ellided a correct description of the reason behind rule, which is >> ... irrelevant to the topic > > I think there is a slight misunderstanding here: > > .git/hg/ will be the actual directory for a hg:: > remote, which will then use mercurial internal magic to refer to > the shared repo .git/hg/.shared in case the remote is not > somewhere on the local filesystem, otherwise that path is used. Yes, it is not a "slight" but a "huge" misunderstanding. I saw the caller of get_repo(url, alias) doing a 'refs/hg/%s' % alias immediately after the call, and somehow assumed that the proposal would result in stuffing .shared to the "alias", which is not the case. The hg/$name directories may be used to store Hg repositories for 'alias' that is passed by the caller, but hg/.shared thing you guys were discussing is internal to get_repo() implementation and there won't be refs/hg/.shared created because of this change.