mercurial/streamclone.py
changeset 47878 31a72e5e9200
parent 47877 2174f54aab18
parent 47871 132525ead0db
child 48596 739f2ca3aa3f
child 48670 6d2ddea0721a
equal deleted inserted replaced
47877:2174f54aab18 47878:31a72e5e9200
   819     for k, path, size in entries:
   819     for k, path, size in entries:
   820         src_vfs = src_vfs_map[k]
   820         src_vfs = src_vfs_map[k]
   821         dst_vfs = dst_vfs_map[k]
   821         dst_vfs = dst_vfs_map[k]
   822         src_path = src_vfs.join(path)
   822         src_path = src_vfs.join(path)
   823         dst_path = dst_vfs.join(path)
   823         dst_path = dst_vfs.join(path)
   824         dirname = dst_vfs.dirname(path)
   824         # We cannot use dirname and makedirs of dst_vfs here because the store
   825         if not dst_vfs.exists(dirname):
   825         # encoding confuses them. See issue 6581 for details.
   826             dst_vfs.makedirs(dirname)
   826         dirname = os.path.dirname(dst_path)
       
   827         if not os.path.exists(dirname):
       
   828             util.makedirs(dirname)
   827         dst_vfs.register_file(path)
   829         dst_vfs.register_file(path)
   828         # XXX we could use the #nb_bytes argument.
   830         # XXX we could use the #nb_bytes argument.
   829         util.copyfile(
   831         util.copyfile(
   830             src_path,
   832             src_path,
   831             dst_path,
   833             dst_path,