--- a/mercurial/localrepo.py Fri Apr 09 12:02:51 2021 +0200
+++ b/mercurial/localrepo.py Thu Apr 08 18:43:08 2021 -0400
@@ -469,7 +469,7 @@
# ``.hg/`` for ``relshared``.
sharedpath = hgvfs.read(b'sharedpath').rstrip(b'\n')
if requirementsmod.RELATIVE_SHARED_REQUIREMENT in requirements:
- sharedpath = hgvfs.join(sharedpath)
+ sharedpath = util.normpath(hgvfs.join(sharedpath))
sharedvfs = vfsmod.vfs(sharedpath, realpath=True)
@@ -3672,6 +3672,7 @@
if createopts.get(b'sharedrelative'):
try:
sharedpath = os.path.relpath(sharedpath, hgvfs.base)
+ sharedpath = util.pconvert(sharedpath)
except (IOError, ValueError) as e:
# ValueError is raised on Windows if the drive letters differ
# on each path.