Patchwork D11063: windows: use abspath in mercurial/hg.py

login
register
mail settings
Submitter phabricator
Date July 10, 2021, 5:46 p.m.
Message ID <differential-rev-PHID-DREV-wjimkhtd355kcuug5dyf-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49377/
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/D11063

AFFECTED FILES
  mercurial/hg.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/hg.py b/mercurial/hg.py
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -567,7 +567,7 @@ 
 
     # Resolve the value to put in [paths] section for the source.
     if islocal(source):
-        defaultpath = os.path.abspath(urlutil.urllocalpath(source))
+        defaultpath = util.abspath(urlutil.urllocalpath(source))
     else:
         defaultpath = source
 
@@ -821,7 +821,7 @@ 
 
         abspath = origsource
         if islocal(origsource):
-            abspath = os.path.abspath(urlutil.urllocalpath(origsource))
+            abspath = util.abspath(urlutil.urllocalpath(origsource))
 
         if islocal(dest):
             if os.path.exists(dest):