[PATCH V3] ui: add new config flag for interface selection

Pierre-Yves David pierre-yves.david at ens-lyon.org
Wed Feb 10 08:35:49 EST 2016



On 02/05/2016 09:08 PM, Augie Fackler wrote:
> On Fri, Feb 05, 2016 at 08:17:00AM -0800, Laurent Charignon wrote:
>> # HG changeset patch
>> # User Laurent Charignon <lcharignon at fb.com>
>> # Date 1454688960 28800
>> #      Fri Feb 05 08:16:00 2016 -0800
>> # Node ID ac519fea89b3e1a5c1edafd403fb78fe229d0a11
>> # Parent  01a5143cd25f285f8c745a92986cd7186bb32c90
>> ui: add new config flag for interface selection
>>
>> This patch introduces a new config flag ui.interface to select the interface
>> for interactive commands. It currently only applies to chunks selection.
>> The config can be overridden on a per feature basis with the flag
>> ui.interface.<feature>.
>>
>> features for the moment can only be 'chunkselector', moving forward we expect
>> to have 'histedit' and other commands there.
>>
>> If an incorrect value is given to ui.interface we print a warning and use the
>> default interface: text. If HGPLAIN is specified we also use the default
>> interface: text.
>>
>> diff --git a/mercurial/help/config.txt b/mercurial/help/config.txt
>> --- a/mercurial/help/config.txt
>> +++ b/mercurial/help/config.txt
>> @@ -1587,6 +1587,17 @@
>>   ``interactive``
>>       Allow to prompt the user. (default: True)
>>
>> +``interface``
>> +    Select the default interface for interactive features (default: text).
>> +    Possible values are 'text' and 'curses'.
>> +
>> +``interface.chunkselector``
>> +    Select the interface for chunkselection.
>> +    Possible values are 'text' and 'crecord'.
>
> Why isn't 'curses' a valid option here? I'm fine with advertising
> crecord, but if you really mean it that picking curses means "best
> available curses UI and we'll keep crecord forever even if it becomes
> horrible by comparison", then you should be able to say
> ui.interface=text and ui.interface.chunkselector=curses and it should
> behave like you'd expect.
>
> (I'm still intensely skeptical of the notion that we'd ever ship
> /multiple/ curses chunkselectors, but I'm not willing to die on that
> hill.)

+1 on having "curse" as the primary option value.

It is also consistent with possible value for 'ui.interface'

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list