# # # patch "ChangeLog" # from [9f66445ed79839a1847bbb8a82d74dabb7467e8d] # to [8b4a9853dd3b1c5ed73c75733d7e581be3fdf70e] # # patch "roster_merge.cc" # from [8b20cb929e5609dc889eabf5462710957753f494] # to [44672a1e32a6fcc39e9999ece451632d8d62f3a2] # ============================================================ --- ChangeLog 9f66445ed79839a1847bbb8a82d74dabb7467e8d +++ ChangeLog 8b4a9853dd3b1c5ed73c75733d7e581be3fdf70e @@ -1,5 +1,10 @@ 2006-02-25 Nathaniel Smith + * roster_merge.cc (roster_merge): Fix strange merge-created + problem... + +2006-02-25 Nathaniel Smith + * work.cc (attach_node): This code should use path_exists, not file_exists. ============================================================ --- roster_merge.cc 8b20cb929e5609dc889eabf5462710957753f494 +++ roster_merge.cc 44672a1e32a6fcc39e9999ece451632d8d62f3a2 @@ -549,6 +549,29 @@ I(right_mi == right_markings.end()); I(new_i == result.roster.all_nodes().end()); } + + // now check for the possible global problems + if (!result.roster.has_root()) + result.missing_root_dir = true; + else + { + // we can't have an illegal MT dir unless we have a root node in the + // first place... + split_path bookkeeping_root_split; + bookkeeping_root_split.push_back(the_null_component); + bookkeeping_root_split.push_back(bookkeeping_root_component); + if (result.roster.has_node(bookkeeping_root_split)) + { + illegal_name_conflict conflict; + node_t n = result.roster.get_node(bookkeeping_root_split); + conflict.nid = n->self; + conflict.parent_name.first = n->parent; + conflict.parent_name.second = n->name; + I(n->name == bookkeeping_root_component); + I(n->self == result.roster.detach_node(bookkeeping_root_split)); + result.illegal_name_conflicts.push_back(conflict); + } + } } #ifdef BUILD_UNIT_TESTS @@ -615,29 +638,6 @@ file_path_internal(s).split(sp); return sp; } - - // now check for the possible global problems - if (!result.roster.has_root()) - result.missing_root_dir = true; - else - { - // we can't have an illegal MT dir unless we have a root node in the - // first place... - split_path bookkeeping_root_split; - bookkeeping_root_split.push_back(the_null_component); - bookkeeping_root_split.push_back(bookkeeping_root_component); - if (result.roster.has_node(bookkeeping_root_split)) - { - illegal_name_conflict conflict; - node_t n = result.roster.get_node(bookkeeping_root_split); - conflict.nid = n->self; - conflict.parent_name.first = n->parent; - conflict.parent_name.second = n->name; - I(n->name == bookkeeping_root_component); - I(n->self == result.roster.detach_node(bookkeeping_root_split)); - result.illegal_name_conflicts.push_back(conflict); - } - } } static void