Merge "Correct RebaseChangeOp running hooks" into stable-2.12

This commit is contained in:
Edwin Kempin 2015-11-13 02:30:26 +00:00 committed by Gerrit Code Review
commit 87dd1d6ad2

View File

@ -25,6 +25,7 @@ import com.google.gerrit.reviewdb.client.RevId;
import com.google.gerrit.server.ChangeUtil;
import com.google.gerrit.server.git.BatchUpdate;
import com.google.gerrit.server.git.BatchUpdate.ChangeContext;
import com.google.gerrit.server.git.BatchUpdate.Context;
import com.google.gerrit.server.git.BatchUpdate.RepoContext;
import com.google.gerrit.server.git.MergeUtil;
import com.google.gerrit.server.git.validators.CommitValidators;
@ -148,6 +149,11 @@ public class RebaseChangeOp extends BatchUpdate.Op {
rebasedPatchSet = patchSetInserter.getPatchSet();
}
@Override
public void postUpdate(Context ctx) throws OrmException {
patchSetInserter.postUpdate(ctx);
}
public PatchSet getPatchSet() {
checkState(rebasedPatchSet != null,
"getPatchSet() only valid after executing update");