D11067: windows: use abspath in url

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Sat Jul 10 17:46:16 UTC 2021


marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  We replace `os.path.abspath` with `util.abspath`. This should solve more "drive
  capitalization" issue on Windows.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/url.py

CHANGE DETAILS

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



To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel


More information about the Mercurial-devel mailing list