Patchwork D11062: windows: use abspath in extensions

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

Comments

phabricator - July 10, 2021, 5:45 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/D11062

AFFECTED FILES
  mercurial/extensions.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/extensions.py b/mercurial/extensions.py
--- a/mercurial/extensions.py
+++ b/mercurial/extensions.py
@@ -713,7 +713,7 @@ 
     # it might not be on a filesystem even if it does.
     if util.safehasattr(hgext, '__file__'):
         extpath = os.path.dirname(
-            os.path.abspath(pycompat.fsencode(hgext.__file__))
+            util.abspath(pycompat.fsencode(hgext.__file__))
         )
         try:
             files = os.listdir(extpath)