[PATCH] Fix -r option in 'hg help clone'

Adrian Buehlmann adrian at cadifra.com
Thu Nov 19 14:54:35 CST 2009


On 19.11.2009 19:29, Matt Mackall wrote:
> On Wed, 2009-11-18 at 23:01 -0500, faheem at email.unc.edu wrote:
>> # HG changeset patch
>> # User faheem at email.unc.edu
>> # Date 1258603281 18000
>> # Node ID 8b231db33a4da2db9bb400b4c72059b1f73c2f5a
>> # Parent  d266aa7606ce82fa926a1d3389453d7cb7b8f200
>> Fix -r option in 'hg help clone'.
>>
>> diff -r d266aa7606ce -r 8b231db33a4d mercurial/commands.py
>> --- a/mercurial/commands.py	Wed Nov 18 00:19:42 2009 +0100
>> +++ b/mercurial/commands.py	Wed Nov 18 23:01:21 2009 -0500
>> @@ -3386,7 +3386,7 @@
>>            ('u', 'updaterev', '',
>>             _('revision, tag or branch to check out')),
>>            ('r', 'rev', [],
>> -           _('a changeset you would like to have after cloning')),
>> +           _('a specific revision up to which you would like to clone')),
> 
> How about 'clone only specified revisions and ancestors'?
> 
> I think that covers all the bases?
> 

Hmm. That sounds a bit like '-r 23 45 68' would be valid.
But only one revision specifier per -r is allowed, right?

How about:

'pull only the specified revision and its ancestors'

It shouldn't be that difficult to understand when we start talking
about the fact that cloning 'mutates' to pulling if -r is used.
In fact this is fine, as it emphasizes that a "full clone" feature
like hard linking is excluded by consequence.

IMHO, 'cloning a revision' is too fuzzy. You can clone repositories,
not revisions. At least we would have to define what 'cloning a
revision' means before using that definition.

The fact that the --rev option may be repeated is covered in the body
of the help text of clone.



More information about the Mercurial-devel mailing list