diff -r 6f62a1c3e11d -r 35fb3367f72d mercurial/subrepo.py --- a/mercurial/subrepo.py Fri Dec 29 05:28:05 2017 +0530 +++ b/mercurial/subrepo.py Fri Dec 29 05:29:04 2017 +0530 @@ -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