This is an archive of the discontinued Mercurial Phabricator instance.

color: remove warnings if term is not formatted (==dumb or !ui.formatted())
ClosedPublic

Authored by spectral on Aug 3 2017, 4:02 PM.

Details

Summary

If the user sets color.mode=terminfo, and then runs in the shell inside of emacs
(so TERM=dumb), the previous behavior was that it would warn about no terminfo
entry for setab/setaf, and then warn about 'failed to set color mode to
terminfo'. The first warning is silenced by carrying 'formatted' through to
_terminfosetup, the second is silenced by using 'formatted' instead of
ui.formatted().

If --color=on (or ui.color=always) is specified, this will still warn, since the
formatted boolean is set to true in these cases.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

spectral created this revision.Aug 3 2017, 4:02 PM
yuja accepted this revision as: yuja.Aug 4 2017, 9:23 AM
yuja added a subscriber: yuja.

Makes sense.

This revision was automatically updated to reflect the committed changes.