# # # patch "rcs_import.cc" # from [0b3d05d5128df36d5a074b4772c695351f267a63] # to [1ef073b17e8e4e0574ce3b4e90a7683514878e8d] # ============================================================ --- rcs_import.cc 0b3d05d5128df36d5a074b4772c695351f267a63 +++ rcs_import.cc 1ef073b17e8e4e0574ce3b4e90a7683514878e8d @@ -346,9 +346,6 @@ cvs_history // all the blobs by their event_digest multimap blob_index; - // all branch events by branchname - map branch_blobs; - // assume an RCS file has foo:X.Y.0.N in it, then // this map contains entries of the form // X.Y.N.1 -> foo @@ -428,8 +425,18 @@ cvs_history get_branch_blob(const cvs_branchname bn) { I(bn != invalid_branch); - I(branch_blobs.find(bn) != branch_blobs.end()); - return branch_blobs.find(bn)->second; + + pair range = + get_blobs(cvs_event_digest(ET_BRANCH, bn), false); + + I(range.first != range.second); + cvs_blob_index result(range.first->second); + + // We are unable to handle split branches here, check for that. + range.first++; + I(range.first == range.second); + + return result; } cvs_blob_index append_event(cvs_event_ptr c) @@ -440,12 +447,6 @@ cvs_history blob_index_iterator b = get_blobs(c->get_digest(), true).first; blobs[b->second].push_back(c); - if (c->get_digest().is_branch()) - { - cvs_branchname bn = boost::static_pointer_cast(c)->branchname; - branch_blobs.insert(make_pair(bn, b->second)); - } - return b->second; }