[PATCH] init: expand configured paths

Mads Kiilerich mads at kiilerich.com
Sun Aug 15 06:11:09 CDT 2010


  Martin Geisler wrote, On 08/15/2010 11:24 AM:
> Mads Kiilerich<mads at kiilerich.com>  writes:
>> "hg help init" sayz:
>>
>>      It is possible to specify an "ssh://" URL as the destination. See
>> "hg help urls" for more information.
>>
>> "hg help urls" sayz:
>>      These URLs can all be stored in your hgrc with path aliases under
>> the [paths] section ...
>>      You can then use the alias for any command that uses a URL ...
>>
>>
>> FWIW I really don't understand your reasoning for why init shouldn't
>> do what the help implies that it does
> Perhaps we don't care that much what the help says? What is important is
> what the command means, and to me it means 'create a new repository here
> with this name'.

Who have hijacked Martins email account?

I really hope we agree that the documentation and the actual 
implementation should match each other, and that we should try to 
achieve consistency between the commands.

> One nice think about your patch is that one can create a local
> repository, configure paths.default and then do 'hg clone . default'.
> Today this creates a directory called 'default'.

No, that is not my patch. The patch we are discussing _only_ touches the 
init command. It doesn't change the clone command.

Clone already uses paths configured in the global config for 
destination. I just want init to do the same.

(The clone and init commands are special in that they are a kind of meta 
commands, not operating on a repo, but operating on (nonexistent) repos 
elsewhere. Clone _could_ use config from the source repo, especially if 
it is local, and even more if it is ".", but I don't think such a 
special case would be good idea.)

/Mads



More information about the Mercurial-devel mailing list