[PATCH] commit: add some help examples (issue4963)

Pierre-Yves David pierre-yves.david at ens-lyon.org
Fri Dec 4 18:20:43 CST 2015



On 12/04/2015 12:59 PM, Augie Fackler wrote:
> On Fri, Dec 4, 2015 at 3:57 PM, Anton Shestakov <engored at ya.ru> wrote:
>> 05.12.2015, 04:51, "Augie Fackler" <raf at durin42.com>:
>>> # HG changeset patch
>>> # User Augie Fackler <augie at google.com>
>>> # Date 1449260645 18000
>>> # Fri Dec 04 15:24:05 2015 -0500
>>> # Node ID f19bf31bc4b064ab4fd2f331f9f5a868f5b9b0f7
>>> # Parent 79db86a0884617202808e979181819df2faaf0c2
>>> commit: add some help examples (issue4963)
>>>
>>> Includes documenting --date now, which resolves the above issue.
>>>
>>> diff --git a/mercurial/commands.py b/mercurial/commands.py
>>> --- a/mercurial/commands.py
>>> +++ b/mercurial/commands.py
>>> @@ -1585,6 +1585,22 @@ def commit(ui, repo, *pats, **opts):
>>>       See :hg:`help dates` for a list of formats valid for -d/--date.
>>>
>>>       Returns 0 on success, 1 if nothing changed.
>>> +
>>> + .. container:: verbose
>>> +
>>> + Examples:
>>> +
>>> + - commit all files ending in .py:
>>> +
>>> + hg commit --include 'set:**.py
>>
>>
>> Unless $ is required due to some reST quirk, it shouldn't be used, since ** means a glob, not a regex. In fact:
>>
>> $ hg commit --include 'set:**.py
>> hg: parse error at 5: syntax error
>
>
> Yep, this had started as a regexp. Oops. Can someone fix it in flight?

This is pushed to the clowncopter, fixed in-flight.

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list