mercurial/pycompat.py
changeset 32859 a05f3675c46a
parent 32615 c9318beb7c1a
child 32860 f22f39d56bb5
--- 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'