Patchwork D11071: windows: use abspath in convert.subversion

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

AFFECTED FILES
  hgext/convert/subversion.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/convert/subversion.py b/hgext/convert/subversion.py
--- a/hgext/convert/subversion.py
+++ b/hgext/convert/subversion.py
@@ -164,7 +164,7 @@ 
         # svn.client.url_from_path() fails with local repositories
         pass
     if os.path.isdir(path):
-        path = os.path.normpath(os.path.abspath(path))
+        path = os.path.normpath(util.abspath(path))
         if pycompat.iswindows:
             path = b'/' + util.normpath(path)
         # Module URL is later compared with the repository URL returned
@@ -431,7 +431,7 @@ 
             path = unicodepath.encode(fsencoding)
     except ValueError:
         proto = b'file'
-        path = os.path.abspath(url)
+        path = util.abspath(url)
         try:
             path.decode(fsencoding)
         except UnicodeDecodeError: