Patchwork D8335: url: pass str to pathname2url

login
register
mail settings
Submitter phabricator
Date April 1, 2020, 3:23 p.m.
Message ID <feea58b1164e558b2fa4897830459086@localhost.localdomain>
Download mbox | patch
Permalink /patch/45968/
State Not Applicable
Headers show

Comments

phabricator - April 1, 2020, 3:23 p.m.
Closed by commit rHGe74af49aa3c9: url: pass str to pathname2url (authored by indygreg).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8335?vs=20901&id=20940

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8335/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D8335

AFFECTED FILES
  mercurial/url.py

CHANGE DETAILS




To: indygreg, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/mercurial/url.py b/mercurial/url.py
--- a/mercurial/url.py
+++ b/mercurial/url.py
@@ -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