mercurial/streamclone.py
branchstable
changeset 47871 132525ead0db
parent 47788 48f07adbda98
child 47878 31a72e5e9200
equal deleted inserted replaced
47870:67af3b3173b7 47871:132525ead0db
   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,