mercurial/url.py
changeset 44645 e74af49aa3c9
parent 44470 9d2b2df2c2ba
child 44766 a50f33f1ff24
--- a/mercurial/url.py	Sat Mar 28 09:21:46 2020 -0700
+++ b/mercurial/url.py	Sat Mar 28 13:12:43 2020 -0700
@@ -674,7 +674,9 @@
         url_, authinfo = u.authinfo()
     else:
         path = util.normpath(os.path.abspath(url_))
-        url_ = b'file://' + pycompat.bytesurl(urlreq.pathname2url(path))
+        url_ = b'file://' + pycompat.bytesurl(
+            urlreq.pathname2url(pycompat.fsdecode(path))
+        )
         authinfo = None
     return opener(ui, authinfo, sendaccept=sendaccept).open(
         pycompat.strurl(url_), data