# # # patch "rcs_import.cc" # from [95636ddda26eecc2213702483de578444e7113b4] # to [cb17754eedc602960d92bec06a6b8ee52b83e442] # ============================================================ --- rcs_import.cc 95636ddda26eecc2213702483de578444e7113b4 +++ rcs_import.cc cb17754eedc602960d92bec06a6b8ee52b83e442 @@ -2835,43 +2835,39 @@ public: check_for_cross_path(new_path_a, new_path_b, true); } } + else if (switch_needed) + { + // If we still need a switch, do the reversed cross path check. + vector new_path_a(path_b); + vector new_path_b(path_a); + check_for_cross_path(new_path_a, new_path_b, false); + } else { - if (switch_needed) + if (needs_cross_path_check) { - // If we still need a switch, do the reversed cross path - // check. - vector new_path_a(path_b); - vector new_path_b(path_a); - check_for_cross_path(new_path_a, new_path_b, false); - } - else - { - if (needs_cross_path_check) - { - // Extra check the other way around. Since either a DFS or - // our cross checks already guarantee that there are no - // more reverse cross paths, this should always succeed. - vector cross_path; - insert_iterator< vector< cvs_blob_index > > - ity_c(cross_path, cross_path.end()); + // Extra check the other way around. Since either a DFS or our + // cross checks already guarantee that there are no more + // reverse cross paths, this should always succeed. + vector cross_path; + insert_iterator< vector< cvs_blob_index > > + ity_c(cross_path, cross_path.end()); - int height_limit(0); - calculate_height_limit(*(++path_a.begin()), - *(++path_b.begin()), - cvs, height_limit); - dijkstra_shortest_path(cvs, *(++path_b.rbegin()), - *(++path_a.begin()), ity_c, - true, true, true, - false, - make_pair(invalid_blob, - invalid_blob), - height_limit); - I(cross_path.empty()); - } + int height_limit(0); + calculate_height_limit(*(++path_a.begin()), + *(++path_b.begin()), + cvs, height_limit); + dijkstra_shortest_path(cvs, *(++path_b.rbegin()), + *(++path_a.begin()), ity_c, + true, true, true, + false, + make_pair(invalid_blob, + invalid_blob), + height_limit); + I(cross_path.empty()); + } - handle_paths_of_cross_edge(path_a, path_b); - } + handle_paths_of_cross_edge(path_a, path_b); } };