Merge "Remove redundant footerLines argument from ChangeInserter"

This commit is contained in:
David Pursehouse
2013-04-22 10:00:16 +00:00
committed by Gerrit Code Review
3 changed files with 9 additions and 12 deletions

View File

@@ -304,8 +304,7 @@ public class ChangeUtil {
LabelTypes labelTypes = refControl.getProjectControl().getLabelTypes();
changeInserter.insertChange(db, change, cmsg, ps, revertCommit,
labelTypes, revertCommit.getFooterLines(), info,
Collections.<Account.Id> emptySet());
labelTypes, info, Collections.<Account.Id> emptySet());
final RevertedSender cm = revertedSenderFactory.create(change);
cm.setFrom(user.getAccountId());

View File

@@ -30,11 +30,9 @@ import com.google.gwtorm.server.OrmException;
import com.google.inject.Inject;
import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.revwalk.FooterLine;
import org.eclipse.jgit.revwalk.RevCommit;
import java.util.Collections;
import java.util.List;
import java.util.Set;
public class ChangeInserter {
@@ -54,22 +52,22 @@ public class ChangeInserter {
}
public void insertChange(ReviewDb db, Change change, PatchSet ps,
RevCommit commit, LabelTypes labelTypes, List<FooterLine> footerLines,
PatchSetInfo info, Set<Account.Id> reviewers) throws OrmException {
insertChange(db, change, null, ps, commit, labelTypes, footerLines, info, reviewers);
RevCommit commit, LabelTypes labelTypes, PatchSetInfo info,
Set<Account.Id> reviewers) throws OrmException {
insertChange(db, change, null, ps, commit, labelTypes, info, reviewers);
}
public void insertChange(ReviewDb db, Change change,
ChangeMessage changeMessage, PatchSet ps, RevCommit commit,
LabelTypes labelTypes, List<FooterLine> footerLines, PatchSetInfo info,
Set<Account.Id> reviewers) throws OrmException {
LabelTypes labelTypes, PatchSetInfo info, Set<Account.Id> reviewers)
throws OrmException {
db.changes().beginTransaction(change.getId());
try {
ChangeUtil.insertAncestors(db, ps.getId(), commit);
db.patchSets().insert(Collections.singleton(ps));
db.changes().insert(Collections.singleton(change));
ChangeUtil.updateTrackingIds(db, change, trackingFooters, footerLines);
ChangeUtil.updateTrackingIds(db, change, trackingFooters, commit.getFooterLines());
approvalsUtil.addReviewers(db, labelTypes, change, ps, info, reviewers,
Collections.<Account.Id> emptySet());
if (changeMessage != null) {

View File

@@ -1466,8 +1466,8 @@ public class ReceiveCommits {
recipients.add(getRecipientsFromFooters(accountResolver, ps, footerLines));
recipients.remove(me);
changeInserter.insertChange(db, change, ps, commit, labelTypes,
footerLines, info, recipients.getReviewers());
changeInserter.insertChange(db, change, ps, commit, labelTypes, info,
recipients.getReviewers());
created = true;