--- a/mercurial/color.py Tue Feb 21 17:50:04 2017 +0100
+++ b/mercurial/color.py Tue Feb 21 17:51:43 2017 +0100
@@ -162,6 +162,8 @@
_terminfo_params.clear()
def _modesetup(ui, coloropt):
+ if ui.plain():
+ return None
if coloropt == 'debug':
return 'debug'