Patchwork D11067: windows: use abspath in url

login
register
mail settings
Submitter phabricator
Date July 10, 2021, 5:46 p.m.
Message ID <differential-rev-PHID-DREV-u6ivh6jyeoxtqtzb6p4g-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49380/
State Superseded
Headers show

Comments

phabricator - July 10, 2021, 5:46 p.m.
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




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

Patch

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))
         )