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

Kevin Bullock kbullock+mercurial at ringworld.org
Tue May 2 12:31:10 EDT 2017


> On May 2, 2017, at 11:22, Pierre-Yves David <pierre-yves.david at ens-lyon.org> wrote:
> 
> 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).

Fair point. I still think this is a bad place for us to be in.

pacem in terris / мир / शान्ति / ‎‫سَلاَم‬ / 平和
Kevin R. Bullock



More information about the Mercurial-devel mailing list