Add batch mode to Abandon
When an extension wants to abandon more than one changes in the same project, batch them together inside a BatchUpdate will be much better than calling Abandon REST API multiple times, so this change provides the batch mode. Also changed AbandonUtil to group changes by project and use the new batchAbandon code. Change-Id: I9d89b58d4cfa469b666a234af1a564c1f5211b19
This commit is contained in:
@@ -64,6 +64,7 @@ import com.google.gerrit.server.OutputFormat;
|
||||
import com.google.gerrit.server.PatchSetUtil;
|
||||
import com.google.gerrit.server.account.AccountCache;
|
||||
import com.google.gerrit.server.account.GroupCache;
|
||||
import com.google.gerrit.server.change.Abandon;
|
||||
import com.google.gerrit.server.change.ChangeResource;
|
||||
import com.google.gerrit.server.change.RevisionResource;
|
||||
import com.google.gerrit.server.change.Revisions;
|
||||
@@ -238,6 +239,9 @@ public abstract class AbstractDaemonTest {
|
||||
@Inject
|
||||
protected ChangeNotes.Factory notesFactory;
|
||||
|
||||
@Inject
|
||||
protected Abandon changeAbandoner;
|
||||
|
||||
@Rule
|
||||
public ExpectedException exception = ExpectedException.none();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user