mercurial/streamclone.py
branchstable
changeset 47871 132525ead0db
parent 47788 48f07adbda98
child 47878 31a72e5e9200
--- a/mercurial/streamclone.py	Wed Aug 25 10:00:55 2021 +0200
+++ b/mercurial/streamclone.py	Wed Aug 25 11:32:49 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(