windows: use abspath in url
authorPierre-Yves David <pierre-yves.david@octobus.net>
Sat, 10 Jul 2021 14:06:46 +0200
changeset 47630 8e5192e41e0b
parent 47629 5cf2059d2647
child 47631 16bae8abcc03
windows: use abspath in url We replace `os.path.abspath` with `util.abspath`. This should solve more "drive capitalization" issue on Windows. Differential Revision: https://phab.mercurial-scm.org/D11067
mercurial/url.py
--- a/mercurial/url.py	Sat Jul 10 14:06:39 2021 +0200
+++ b/mercurial/url.py	Sat Jul 10 14:06:46 2021 +0200
@@ -10,7 +10,6 @@
 from __future__ import absolute_import
 
 import base64
-import os
 import socket
 import sys
 
@@ -685,7 +684,7 @@
         u.scheme = u.scheme.lower()
         url_, authinfo = u.authinfo()
     else:
-        path = util.normpath(os.path.abspath(url_))
+        path = util.normpath(util.abspath(url_))
         url_ = b'file://' + pycompat.bytesurl(
             urlreq.pathname2url(pycompat.fsdecode(path))
         )