Mercurial > public > mercurial-scm > hg
comparison mercurial/hg.py @ 47626:1fdf315eff66
windows: use abspath in mercurial/hg.py
We replace `os.path.abspath` with `util.abspath`. This should solve more "drive
capitalization" issue on Windows.
Differential Revision: https://phab.mercurial-scm.org/D11063
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sat, 10 Jul 2021 14:06:06 +0200 |
parents | 377d8fc20e34 |
children | 5ced12cfa41b |
comparison
equal
deleted
inserted
replaced
47625:7bafe40ab78a | 47626:1fdf315eff66 |
---|---|
565 stream=stream, | 565 stream=stream, |
566 ) | 566 ) |
567 | 567 |
568 # Resolve the value to put in [paths] section for the source. | 568 # Resolve the value to put in [paths] section for the source. |
569 if islocal(source): | 569 if islocal(source): |
570 defaultpath = os.path.abspath(urlutil.urllocalpath(source)) | 570 defaultpath = util.abspath(urlutil.urllocalpath(source)) |
571 else: | 571 else: |
572 defaultpath = source | 572 defaultpath = source |
573 | 573 |
574 sharerepo = repository(ui, path=sharepath) | 574 sharerepo = repository(ui, path=sharepath) |
575 destrepo = share( | 575 destrepo = share( |
819 | 819 |
820 srcrepo = srcpeer.local() | 820 srcrepo = srcpeer.local() |
821 | 821 |
822 abspath = origsource | 822 abspath = origsource |
823 if islocal(origsource): | 823 if islocal(origsource): |
824 abspath = os.path.abspath(urlutil.urllocalpath(origsource)) | 824 abspath = util.abspath(urlutil.urllocalpath(origsource)) |
825 | 825 |
826 if islocal(dest): | 826 if islocal(dest): |
827 if os.path.exists(dest): | 827 if os.path.exists(dest): |
828 # only clean up directories we create ourselves | 828 # only clean up directories we create ourselves |
829 hgdir = os.path.realpath(os.path.join(dest, b".hg")) | 829 hgdir = os.path.realpath(os.path.join(dest, b".hg")) |