D5034: py3: use stringutil.pprint() in color.py instead of '%r'

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Sat Oct 13 01:05:34 EDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHGcabf09dbc6e0: py3: use stringutil.pprint() in color.py instead of '%r' (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5034?vs=11968&id=11989

REVISION DETAIL
  https://phab.mercurial-scm.org/D5034

AFFECTED FILES
  contrib/python3-whitelist
  mercurial/color.py

CHANGE DETAILS

diff --git a/mercurial/color.py b/mercurial/color.py
--- a/mercurial/color.py
+++ b/mercurial/color.py
@@ -296,9 +296,9 @@
                 if valideffect(ui, e):
                     good.append(e)
                 else:
-                    ui.warn(_("ignoring unknown color/effect %r "
+                    ui.warn(_("ignoring unknown color/effect %s "
                               "(configured in color.%s)\n")
-                            % (e, status))
+                            % (stringutil.pprint(e), status))
             ui._styles[status] = ' '.join(good)
 
 def _activeeffects(ui):
diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist
--- a/contrib/python3-whitelist
+++ b/contrib/python3-whitelist
@@ -534,6 +534,7 @@
 test-ssh.t
 test-sshserver.py
 test-stack.t
+test-status-color.t
 test-status-inprocess.py
 test-status-rev.t
 test-status-terse.t



To: pulkit, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list