Merge changes from topic 'mergeop-prep'

* changes:
  MergeOp: Pre-open all OpenRepos
  MergeOp: Store caller in an instance field
  MergeOp: Hold onto timestamp from submissionId
  MergeUtil: Don't step on existing status in markCleanMerges
  MergeTip: Expose initial tip
  ChangeSet: Expose changes keyed by ID
  ChangeNotesTest: Fix batch writing examples
  BatchUpdate: Key ChangeUpdates by patch set
  BatchUpdate: Shorten ChangeContext method names
  RebaseChangeOp: Expose new commit object in a getter
  AbstractSubmit: Include error message when submit fails
  BatchUpdate: Support executing multiple updates at once
  MergeOp: Encapsulate maps keyed by Change.Id
  BatchUpdate: Support chaining ReceiveCommands on the same ref
  MergeOp: Simplify stamping labels at submit time
  AbstractSubmit: Add extra isNotNull assertion
  RebaseIfNecessary: Don't overwrite committer ident
This commit is contained in:
Dave Borowitz
2016-01-14 14:14:36 +00:00
committed by Gerrit Code Review
31 changed files with 540 additions and 371 deletions

View File

@@ -211,7 +211,9 @@ public abstract class AbstractSubmit extends AbstractDaemonTest {
SubmitInput subm = new SubmitInput();
RestResponse r =
adminSession.post("/changes/" + changeId + "/submit", subm);
assertThat(r.getStatusCode()).isEqualTo(expectedStatus);
assertThat(r.getStatusCode())
.named("Status code [" + r.getEntityContent() + "]")
.isEqualTo(expectedStatus);
if (expectedStatus == HttpStatus.SC_OK) {
checkArgument(msg == null, "msg must be null for successful submits");
ChangeInfo change =
@@ -289,6 +291,7 @@ public abstract class AbstractSubmit extends AbstractDaemonTest {
getOnlyElement(queryProvider.get().byKeyPrefix(changeId)).change());
PatchSetApproval submitter = approvalsUtil.getSubmitter(
db, cn, new PatchSet.Id(cn.getChangeId(), psId));
assertThat(submitter).isNotNull();
assertThat(submitter.isSubmit()).isTrue();
assertThat(submitter.getAccountId()).isEqualTo(admin.getId());
}