[PATCH stable] color: tweak behavior of ui.color config knob

Pierre-Yves David pierre-yves.david at ens-lyon.org
Tue May 2 12:22:32 EDT 2017



On 05/02/2017 06:09 PM, Kevin Bullock wrote:
>> On May 2, 2017, at 09:55, Pierre-Yves David <pierre-yves.david at ens-lyon.org> wrote:
>>
>> Let me try to clarify. We are talking about possible surprising corner cases here.
>>
>> The current implementation "suffer" from one surprise:
>>
>> 1) ui.color=True is actually "always color"
>
> To me, this is a pretty bad situation. In 4.1 and earlier, turning on color by enabling the color extension and then cat'ing output to a file does the right thing (strips colors). Now if I enable color by setting ui.color=True, I get horrible escape codes in my output.

To put things into perspective, users won't have to enable color since 
color is on by default. So I see the risk of confusion as pretty low.
They only have to -re-enable- it if the system why config turned it off 
globally (something I expect to be very rare).


-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list