diff -r bfb4494f846d -r 698fe0f6eb5c mercurial/url.py --- a/mercurial/url.py Mon Feb 26 13:34:35 2018 -0800 +++ b/mercurial/url.py Tue Feb 27 00:43:37 2018 +0530 @@ -528,4 +528,4 @@ path = util.normpath(os.path.abspath(url_)) url_ = 'file://' + urlreq.pathname2url(path) authinfo = None - return opener(ui, authinfo).open(url_, data) + return opener(ui, authinfo).open(pycompat.strurl(url_), data)