# # patch "work.cc" # from [7782aba9f7122a0d161af8d125401ec264a24efb] # to [116e7d9c0506e448361e8c209e56553ff60882db] # ======================================================================== --- work.cc 7782aba9f7122a0d161af8d125401ec264a24efb +++ work.cc 116e7d9c0506e448361e8c209e56553ff60882db @@ -222,6 +222,21 @@ update_any_attrs(app); } +static void +add_parent_dirs(split_path const & dst, roster_t & ros, node_id_source & nis, + app_state & app) +{ + editable_roster_base er(ros, nis); + addition_builder build(app, ros, er); + + split_path dirname; + path_component basename; + dirname_basename(dst, dirname, basename); + + // FIXME: this is a somewhat odd way to use the builder + build.visit_dir(dirname); +} + void perform_rename(file_path const & src_path, file_path const & dst_path, @@ -242,6 +257,8 @@ N(!new_roster.has_node(dst), F("%s already exists in current revision\n") % dst_path); + add_parent_dirs(dst, new_roster, nis, app); + P(F("adding %s -> %s to working copy rename set\n") % src_path % dst_path); node_id nid = new_roster.detach_node(src);