##// END OF EJS Templates
convert: fix two %r output formats with pycompat.bytestr() wrapping...
Augie Fackler -
r36578:41c0e7b7 default
parent child Browse files
Show More
@@ -11,6 +11,7 b' import posixpath'
11 from mercurial.i18n import _
11 from mercurial.i18n import _
12 from mercurial import (
12 from mercurial import (
13 error,
13 error,
14 pycompat,
14 )
15 )
15 from . import common
16 from . import common
16 SKIPREV = common.SKIPREV
17 SKIPREV = common.SKIPREV
@@ -67,7 +68,8 b' class filemapper(object):'
67 name.endswith('/') or
68 name.endswith('/') or
68 '//' in name):
69 '//' in name):
69 self.ui.warn(_('%s:%d: superfluous / in %s %r\n') %
70 self.ui.warn(_('%s:%d: superfluous / in %s %r\n') %
70 (lex.infile, lex.lineno, listname, name))
71 (lex.infile, lex.lineno, listname,
72 pycompat.bytestr(name)))
71 return 1
73 return 1
72 return 0
74 return 0
73 lex = common.shlexer(
75 lex = common.shlexer(
@@ -92,7 +94,7 b' class filemapper(object):'
92 errs += self.parse(normalize(lex.get_token()))
94 errs += self.parse(normalize(lex.get_token()))
93 else:
95 else:
94 self.ui.warn(_('%s:%d: unknown directive %r\n') %
96 self.ui.warn(_('%s:%d: unknown directive %r\n') %
95 (lex.infile, lex.lineno, cmd))
97 (lex.infile, lex.lineno, pycompat.bytestr(cmd)))
96 errs += 1
98 errs += 1
97 cmd = lex.get_token()
99 cmd = lex.get_token()
98 return errs
100 return errs
General Comments 0
You need to be logged in to leave comments. Login now