# # # patch "rcs_import.cc" # from [e06e1b8ae93074b87befa90c00db91c8d9ddcceb] # to [2388a42613d30026597f1d0afc3f4ba90ed777e8] # ============================================================ --- rcs_import.cc e06e1b8ae93074b87befa90c00db91c8d9ddcceb +++ rcs_import.cc 2388a42613d30026597f1d0afc3f4ba90ed777e8 @@ -665,7 +665,6 @@ process_rcs_branch(string const & begin_ static void process_rcs_branch(string const & begin_version, - cvs_event_ptr const & dep_commit, vector< piece > const & begin_lines, data const & begin_data, hexenc const & begin_id, @@ -675,7 +674,7 @@ process_rcs_branch(string const & begin_ bool dryrun) { cvs_event_ptr curr_commit; - cvs_event_ptr last_commit = dep_commit; + cvs_event_ptr last_commit; string curr_version = begin_version; scoped_ptr< vector< piece > > next_lines(new vector); scoped_ptr< vector< piece > > curr_lines(new vector @@ -812,21 +811,21 @@ process_rcs_branch(string const & begin_ dryrun); } - cvs_event_ptr branch_event = - boost::static_pointer_cast( - shared_ptr( - new cvs_event_branch(curr_commit, - cvs.branchname_interner.intern(branchname)))); - // recursively process child branches - process_rcs_branch(*i, branch_event, branch_lines, branch_data, - branch_id, r, db, cvs, dryrun); + process_rcs_branch(*i, branch_lines, branch_data, + branch_id, r, db, cvs, dryrun); if (!priv) L(FL("finished RCS branch %s = '%s'") % (*i) % branchname); else L(FL("finished private RCS branch %s") % (*i)); + cvs_event_ptr branch_event = + boost::static_pointer_cast( + shared_ptr( + new cvs_event_branch(curr_commit, + cvs.branchname_interner.intern(branchname)))); + // FIXME: is this still needed here? // make sure curr_commit exists in the blob cvs.get_blob(curr_commit->get_digest(), false); @@ -887,10 +886,8 @@ import_rcs_file_with_cvs(string const & global_pieces.reset(); global_pieces.index_deltatext(r.deltatexts.find(r.admin.head)->second, head_lines); - - // start processing branches, with an empty cvs_event_ptr - process_rcs_branch(r.admin.head, cvs_event_ptr(), head_lines, dat, id, - r, app.db, cvs, app.opts.dryrun); + process_rcs_branch(r.admin.head, head_lines, dat, id, r, app.db, cvs, + app.opts.dryrun); global_pieces.reset(); }