diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py --- a/mercurial/debugcommands.py +++ b/mercurial/debugcommands.py @@ -180,7 +180,7 @@ ui.progress(_('building'), id, unit=_('revisions'), total=total) for type, data in dagparser.parsedag(text): if type == 'n': - ui.note(('node %s\n' % str(data))) + ui.note(('node %s\n' % pycompat.bytestr(data))) id, ps = data files = [] diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py --- a/mercurial/subrepo.py +++ b/mercurial/subrepo.py @@ -389,14 +389,14 @@ if util.safehasattr(repo, '_subparent'): source = util.url(repo._subsource) if source.isabs(): - return str(source) + return pycompat.bytestr(source) source.path = posixpath.normpath(source.path) parent = _abssource(repo._subparent, push, abort=False) if parent: parent = util.url(util.pconvert(parent)) parent.path = posixpath.join(parent.path or '', source.path) parent.path = posixpath.normpath(parent.path) - return str(parent) + return pycompat.bytestr(parent) else: # recursion reached top repo if util.safehasattr(repo, '_subtoppath'): return repo._subtoppath diff --git a/mercurial/verify.py b/mercurial/verify.py --- a/mercurial/verify.py +++ b/mercurial/verify.py @@ -17,6 +17,7 @@ from . import ( error, + pycompat, revlog, scmutil, util, @@ -105,7 +106,8 @@ if self.lrugetctx(l)[f].filenode() == node] except Exception: pass - self.warn(_(" (expected %s)") % " ".join(map(str, linkrevs))) + self.warn(_(" (expected %s)") % " ".join + (map(pycompat.bytestr, linkrevs))) lr = None # can't be trusted try: