[PATCH 3 of 5] show: standarize abort output with help output

Ryan McElroy rm at fb.com
Wed Apr 12 07:35:22 EDT 2017


On 4/11/17 2:01 PM, Yuya Nishihara wrote:
> On Mon, 10 Apr 2017 02:41:05 -0700, Ryan McElroy wrote:
>> # HG changeset patch
>> # User Ryan McElroy <rmcelroy at fb.com>
>> # Date 1491585973 25200
>> #      Fri Apr 07 10:26:13 2017 -0700
>> # Node ID ee1bd54bfda1dd1aea0f9b2397ddeae42d58c54a
>> # Parent  9397e5834ce19a95fbc6a6bb1cf099ec3c00f8f3
>> show: standarize abort output with help output
>>
>> diff --git a/hgext/show.py b/hgext/show.py
>> --- a/hgext/show.py
>> +++ b/hgext/show.py
>> @@ -131,5 +131,5 @@ def showbookmarks(ui, repo, fm):
>>   # TODO make this more robust.
>>   longest = max(map(len, showview._table.keys()))
>>   for key in sorted(showview._table.keys()):
>> -    cmdtable['show'][0].__doc__ += ' %s   %s\n' % (
>> +    cmdtable['show'][0].__doc__ += (showview._docformat + '\n') % (
>>           key.ljust(longest), showview._table[key]._origdoc)
>> diff --git a/tests/test-show.t b/tests/test-show.t
>> --- a/tests/test-show.t
>> +++ b/tests/test-show.t
>> @@ -37,7 +37,7 @@ No arguments shows available views
>>     
>>         Available views:
>>     
>> -       bookmarks   bookmarks and their associated changeset
>> +      bookmarks -- bookmarks and their associated changeset
> Perhaps the original version derives from "hg help", which seems more
> standard.


So to be clear we're okay with the divergent output here? It bothers me 
since both are sharing the same "source of truth" (the docblocks), but I 
can get over it.


More information about the Mercurial-devel mailing list