[Updated] D11971: subrepo: make -S work again on Windows for incoming/outgoing to remote repos
mharbison72 (Matt Harbison)
phabricator at mercurial-scm.org
Mon Jan 17 10:54:10 UTC 2022
Closed by commit rHG21bb97351ef9: subrepo: make -S work again on Windows for incoming/outgoing to remote repos (authored by mharbison72).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D11971?vs=31626&id=31661
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D11971/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D11971
AFFECTED FILES
mercurial/hg.py
CHANGE DETAILS
diff --git a/mercurial/hg.py b/mercurial/hg.py
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -10,6 +10,7 @@
import errno
import os
+import posixpath
import shutil
import stat
import weakref
@@ -1285,7 +1286,11 @@
source = bytes(subpath)
else:
p = urlutil.url(source)
- p.path = os.path.normpath(b'%s/%s' % (p.path, subpath))
+ if p.islocal():
+ normpath = os.path.normpath
+ else:
+ normpath = posixpath.normpath
+ p.path = normpath(b'%s/%s' % (p.path, subpath))
source = bytes(p)
other = peer(repo, opts, source)
cleanupfn = other.close
@@ -1356,7 +1361,11 @@
dest = bytes(subpath)
else:
p = urlutil.url(dest)
- p.path = os.path.normpath(b'%s/%s' % (p.path, subpath))
+ if p.islocal():
+ normpath = os.path.normpath
+ else:
+ normpath = posixpath.normpath
+ p.path = normpath(b'%s/%s' % (p.path, subpath))
dest = bytes(p)
branches = path.branch, opts.get(b'branch') or []
To: mharbison72, #hg-reviewers, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20220117/6537cf2c/attachment-0002.html>
More information about the Mercurial-patches
mailing list