# # # patch "rcs_import.cc" # from [d6bfd82a98a2e21d14ea6e10c66f30d2060809cb] # to [4489b7e3206e0585fd114936a513c9bc0d8df604] # ============================================================ --- rcs_import.cc d6bfd82a98a2e21d14ea6e10c66f30d2060809cb +++ rcs_import.cc 4489b7e3206e0585fd114936a513c9bc0d8df604 @@ -783,6 +783,17 @@ process_rcs_branch(string const & begin_ new cvs_event_tag(curr_commit, tag))); cvs_blob_index bi = cvs.append_event(event); + + // Append to the last_commit deps. While not quite obvious, + // we absolutely need this dependency! Think of it as: the + // 'action of tagging must' come before the next commit. + // + // If we didn't add this dependency, the tag could be deferred + // by the toposort to many revisions later. Instead, we want + // to raise conflict, if a commit interferes with a tagging + // action. + if (last_commit) + last_commit->dependencies.push_back(event); } } @@ -869,6 +880,12 @@ process_rcs_branch(string const & begin_ L(FL("added branch event for file %s into branch %s") % cvs.path_interner.lookup(curr_commit->path) % branchname); + + // Make the last commit depend on this branch, so that this + // commit action certainly comes after the branch action. See + // the comment above for tags. + if (last_commit) + last_commit->dependencies.push_back(branch_event); } }