changeset 36560:41c0e7b7869c

convert: fix two %r output formats with pycompat.bytestr() wrapping Differential Revision: https://phab.mercurial-scm.org/D2529
author Augie Fackler <augie@google.com>
date Thu, 01 Mar 2018 18:13:50 -0500
parents 5374a22d014a
children 23d1096b4b37
files hgext/convert/filemap.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/filemap.py	Thu Mar 01 17:48:06 2018 -0500
+++ b/hgext/convert/filemap.py	Thu Mar 01 18:13:50 2018 -0500
@@ -11,6 +11,7 @@
 from mercurial.i18n import _
 from mercurial import (
     error,
+    pycompat,
 )
 from . import common
 SKIPREV = common.SKIPREV
@@ -67,7 +68,8 @@
                 name.endswith('/') or
                 '//' in name):
                 self.ui.warn(_('%s:%d: superfluous / in %s %r\n') %
-                             (lex.infile, lex.lineno, listname, name))
+                             (lex.infile, lex.lineno, listname,
+                              pycompat.bytestr(name)))
                 return 1
             return 0
         lex = common.shlexer(
@@ -92,7 +94,7 @@
                 errs += self.parse(normalize(lex.get_token()))
             else:
                 self.ui.warn(_('%s:%d: unknown directive %r\n') %
-                             (lex.infile, lex.lineno, cmd))
+                             (lex.infile, lex.lineno, pycompat.bytestr(cmd)))
                 errs += 1
             cmd = lex.get_token()
         return errs