[PATCH 2 of 2 evolve-ext-V2] evolve: improve the help of the uncommit command

Laurent Charignon lcharignon at fb.com
Fri Jun 26 13:29:53 CDT 2015


> On Jun 26, 2015, at 1:06 AM, Pierre-Yves David <pierre-yves.david at ens-lyon.org> wrote:
> 
> 
> 
> On 06/25/2015 05:16 PM, Laurent Charignon wrote:
>> # HG changeset patch
>> # User Laurent Charignon <lcharignon at fb.com>
>> # Date 1435251931 25200
>> #      Thu Jun 25 10:05:31 2015 -0700
>> # Node ID 43d8262f1613aa2d47e279648a3c5d063122a1c5
>> # Parent  f812058b33ee82caf35d8da6771ef88f02e6d26c
>> evolve: improve the help of the uncommit command
>> 
>> This patch improves the wording of the help for the uncommit command.
>> 
>> diff --git a/hgext/evolve.py b/hgext/evolve.py
>> --- a/hgext/evolve.py
>> +++ b/hgext/evolve.py
>> @@ -2394,17 +2394,18 @@ def _uncommitdirstate(repo, oldctx, matc
>>  def uncommit(ui, repo, *pats, **opts):
>>      """move changes from parent revision to working directory
>> 
>> -    Changes to selected files in the checked out revision appear again as
>> -    uncommitted changed in the working directory. A new revision
>> -    without the selected changes is created, becomes the checked out
>> -    revision, and obsoletes the previous one.
>> +    This command allows you to select files to keep or exclude from the parent
>> +    revision with the --include and --exclude flags. It does not touch the
>> +    content of your working directory.
> 
> 
> This details about -I and -E in the main part of the help looks superfluous. They are kind of common flag already. Also, the main way to specify pattern is by plain argument -I and -E are only for very advanced usecase.

I didn't even know that :P Thanks

> 
>> +
>> +    A new revision without the selected changes is created, becomes the
>> +    checked out revision, and obsoletes the previous one.
>> 
>>      The --include option specifies patterns to uncommit.
>>      The --exclude option specifies patterns to keep in the commit.
> 
> This clarification of the role of -I and -E would be welcome, in there respective option help.

Ok cool.

I will play with the command, rethink about this patch, and send a new version later.

> 
> 
>> 
>> -    The --rev argument let you change the commit file to a content of another
>> -    revision. It still does not change the content of your file in the working
>> -    directory.
>> +    The --rev argument lets you change the commit files to the content of another
>> +    revision. It still does not change the content of your working directory.
>> 
>>      Return 0 if changed files are uncommitted.
>>      """
>> diff --git a/tests/test-tutorial.t b/tests/test-tutorial.t
>> --- a/tests/test-tutorial.t
>> +++ b/tests/test-tutorial.t
>> @@ -441,16 +441,18 @@ of the `uncommit` command to splitting a
>> 
>>    move changes from parent revision to working directory
>> 
>> -      Changes to selected files in the checked out revision appear again as
>> -      uncommitted changed in the working directory. A new revision without the
>> -      selected changes is created, becomes the checked out revision, and
>> -      obsoletes the previous one.
>> +      This command allows you to select files to keep or exclude from the parent
>> +      revision with the --include and --exclude flags. It does not touch the
>> +      content of your working directory.
>> +
>> +      A new revision without the selected changes is created, becomes the
>> +      checked out revision, and obsoletes the previous one.
>> 
>>        The --include option specifies patterns to uncommit. The --exclude option
>>        specifies patterns to keep in the commit.
>> 
>> -      The --rev argument let you change the commit file to a content of another
>> -      revision. It still does not change the content of your file in the working
>> +      The --rev argument lets you change the commit files to the content of
>> +      another revision. It still does not change the content of your working
>>        directory.
>> 
>>        Return 0 if changed files are uncommitted.
>> _______________________________________________
>> Mercurial-devel mailing list
>> Mercurial-devel at selenic.com
>> https://selenic.com/mailman/listinfo/mercurial-devel
>> 
> 
> -- 
> Pierre-Yves David



More information about the Mercurial-devel mailing list