ui: use pycompat.bytestr() to get a bytes-repr of config default
authorAugie Fackler <augie@google.com>
Mon, 12 Feb 2018 20:41:47 -0500
changeset 36126 8f5c7f906f9b
parent 36125 0dde5f53b4ce
child 36127 df1760b58fda
ui: use pycompat.bytestr() to get a bytes-repr of config default We don't know what type we'll get here, so we need something that'll behave like a repr without returning a unicode. Differential Revision: https://phab.mercurial-scm.org/D2208
mercurial/ui.py
--- a/mercurial/ui.py	Mon Feb 12 20:39:48 2018 -0500
+++ b/mercurial/ui.py	Mon Feb 12 20:41:47 2018 -0500
@@ -498,7 +498,7 @@
               and default != itemdefault):
             msg = ("specifying a mismatched default value for a registered "
                    "config item: '%s.%s' '%s'")
-            msg %= (section, name, default)
+            msg %= (section, name, pycompat.bytestr(default))
             self.develwarn(msg, 2, 'warn-config-default')
 
         for s, n in alternates: