# # # patch "rcs_import.cc" # from [34a20e7fa5a05ff3253a97b91aba37d0d45e2c06] # to [4cdd14813471adf183ecce931aa8f9298820d33b] # ============================================================ --- rcs_import.cc 34a20e7fa5a05ff3253a97b91aba37d0d45e2c06 +++ rcs_import.cc 4cdd14813471adf183ecce931aa8f9298820d33b @@ -2345,43 +2345,7 @@ public: // will be able to resolve the first one we have deferred // before. - { - vector cross_path; - insert_iterator< vector< cvs_blob_index > > - ity_c(cross_path, cross_path.end()); - dijkstra_shortest_path(cvs, *(++path_b.begin()), *(++path_a.rbegin()), - ity_c, - true, // downwards - true, true, true, // follow all colors - false, - make_pair(invalid_blob, invalid_blob)); - - if (!cross_path.empty()) - { - L(FL("deferred resolving cross edge to later.")); - - /* - * Well, we didn't really remove anything, but this - * makes sure another complete depth first search is - * run, so that this cross edge will be handled - * eventually. - */ - edges_deferred++; - return; - } - - // extra check the other way around, can theoretically be - // skipped, as DFS guarantees that already. - dijkstra_shortest_path(cvs, *(++path_a.begin()), *(++path_b.rbegin()), - ity_c, - true, // downwards - true, true, true, // follow all colors - false, - make_pair(invalid_blob, invalid_blob)); - I(cross_path.empty()); - } - // Check if any one of the two paths contains a branch start. bool a_has_branch = false; vector::iterator first_branch_start_in_path_a; @@ -2626,6 +2590,43 @@ public: I(!a_has_branch); I(!b_has_branch); + { + vector cross_path; + insert_iterator< vector< cvs_blob_index > > + ity_c(cross_path, cross_path.end()); + + dijkstra_shortest_path(cvs, *(++path_b.begin()), *(++path_a.rbegin()), + ity_c, + true, // downwards + true, true, true, // follow all colors + false, + make_pair(invalid_blob, invalid_blob)); + + if (!cross_path.empty()) + { + L(FL("deferred resolving cross edge to later.")); + + /* + * Well, we didn't really remove anything, but this + * makes sure another complete depth first search is + * run, so that this cross edge will be handled + * eventually. + */ + edges_deferred++; + return; + } + + // extra check the other way around, can theoretically be + // skipped, as DFS guarantees that already. + dijkstra_shortest_path(cvs, *(++path_a.begin()), *(++path_b.rbegin()), + ity_c, + true, // downwards + true, true, true, // follow all colors + false, + make_pair(invalid_blob, invalid_blob)); + I(cross_path.empty()); + } + // If none of the two paths has a branch start, we can simply // join them into one path, which satisfies all of the // dependencies and is correct with regard to timestamps.