Patchwork D2529: convert: fix two %r output formats with pycompat.bytestr() wrapping

login
register
mail settings
Submitter phabricator
Date March 2, 2018, 2:16 a.m.
Message ID <9ef0eee01d7b4299cca9a495e3bc0a5e@localhost.localdomain>
Download mbox | patch
Permalink /patch/28658/
State Not Applicable
Headers show

Comments

phabricator - March 2, 2018, 2:16 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGee0192854bb4: convert: fix two %r output formats with pycompat.bytestr() wrapping (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2529?vs=6305&id=6322

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

AFFECTED FILES
  hgext/convert/filemap.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/convert/filemap.py b/hgext/convert/filemap.py
--- a/hgext/convert/filemap.py
+++ b/hgext/convert/filemap.py
@@ -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