diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py --- a/mercurial/debugcommands.py +++ b/mercurial/debugcommands.py @@ -427,7 +427,7 @@ 'hg debugcolor') def debugcolor(ui, repo, **opts): """show available color, effects or style""" - ui.write(('color mode: %s\n') % ui._colormode) + ui.write(('color mode: %s\n') % stringutil.pprint(ui._colormode)) if opts.get(r'style'): return _debugdisplaystyle(ui) else: diff --git a/tests/test-debugcommands.t b/tests/test-debugcommands.t --- a/tests/test-debugcommands.t +++ b/tests/test-debugcommands.t @@ -337,7 +337,7 @@ #if no-windows $ hg debugcolor --style --color always | egrep 'mode|style|log\.' - color mode: ansi + color mode: 'ansi' available style: \x1b[0;33mlog.changeset\x1b[0m: \x1b[0;33myellow\x1b[0m (esc) #endif