diff mercurial/streamclone.py @ 47878:31a72e5e9200

branching: merge stable into default
author Rapha?l Gom?s <rgomes@octobus.net>
date Wed, 25 Aug 2021 15:15:19 +0200
parents 2174f54aab18 132525ead0db
children 739f2ca3aa3f 6d2ddea0721a
line wrap: on
line diff
--- a/mercurial/streamclone.py	Mon Aug 02 08:05:13 2021 -0400
+++ b/mercurial/streamclone.py	Wed Aug 25 15:15:19 2021 +0200
@@ -821,9 +821,11 @@
         dst_vfs = dst_vfs_map[k]
         src_path = src_vfs.join(path)
         dst_path = dst_vfs.join(path)
-        dirname = dst_vfs.dirname(path)
-        if not dst_vfs.exists(dirname):
-            dst_vfs.makedirs(dirname)
+        # We cannot use dirname and makedirs of dst_vfs here because the store
+        # encoding confuses them. See issue 6581 for details.
+        dirname = os.path.dirname(dst_path)
+        if not os.path.exists(dirname):
+            util.makedirs(dirname)
         dst_vfs.register_file(path)
         # XXX we could use the #nb_bytes argument.
         util.copyfile(