diff options
Diffstat (limited to 'java/com/google/gerrit/server/update/BatchUpdate.java')
-rw-r--r-- | java/com/google/gerrit/server/update/BatchUpdate.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/java/com/google/gerrit/server/update/BatchUpdate.java b/java/com/google/gerrit/server/update/BatchUpdate.java index 32529f7ca1..db4509a077 100644 --- a/java/com/google/gerrit/server/update/BatchUpdate.java +++ b/java/com/google/gerrit/server/update/BatchUpdate.java @@ -453,6 +453,11 @@ public class BatchUpdate implements AutoCloseable { execute(ImmutableList.of(this), ImmutableList.of(), false); } + public BatchRefUpdate prepareRefUpdates() throws Exception { + ChangesHandle handle = executeChangeOps(ImmutableList.of(), false); + return handle.prepare(); + } + public boolean isExecuted() { return executed; } @@ -639,6 +644,10 @@ public class BatchUpdate implements AutoCloseable { checkArgument(old == null, "result for change %s already set: %s", id, old); } + public BatchRefUpdate prepare() throws IOException { + return manager.prepare(); + } + void execute() throws IOException { BatchUpdate.this.batchRefUpdate = manager.execute(dryrun); BatchUpdate.this.executed = manager.isExecuted(); |