mercurial/streamclone.py
changeset 47878 31a72e5e9200
parent 47877 2174f54aab18
parent 47871 132525ead0db
child 48596 739f2ca3aa3f
child 48670 6d2ddea0721a
--- 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(