diff -r ed1f376090cd -r a05f3675c46a mercurial/pycompat.py --- a/mercurial/pycompat.py Thu Jun 15 21:59:42 2017 -0400 +++ b/mercurial/pycompat.py Fri Jun 16 00:32:52 2017 +0530 @@ -173,6 +173,10 @@ return s return s.decode(u'latin-1') + def strurl(url): + """Converts a bytes url back to str""" + return url.decode(u'ascii') + def raisewithtb(exc, tb): """Raise exception with the given traceback""" raise exc.with_traceback(tb) @@ -244,6 +248,7 @@ iterbytestr = iter sysbytes = identity sysstr = identity + strurl = identity # this can't be parsed on Python 3 exec('def raisewithtb(exc, tb):\n'