Merge changes from topic 'addUpdateChange'

* changes:
  Add new REST api for creating a merge patch set for change
  Refactor ReplaceOp for updating change rest api
This commit is contained in:
Dave Borowitz
2016-10-17 19:40:35 +00:00
committed by Gerrit Code Review
9 changed files with 453 additions and 10 deletions

View File

@@ -17,6 +17,7 @@ package com.google.gerrit.extensions.api.changes;
import com.google.gerrit.extensions.client.ListChangesOption;
import com.google.gerrit.extensions.common.AccountInfo;
import com.google.gerrit.extensions.common.ChangeInfo;
import com.google.gerrit.extensions.common.MergePatchSetInput;
import com.google.gerrit.extensions.common.CommentInfo;
import com.google.gerrit.extensions.common.EditInfo;
import com.google.gerrit.extensions.common.SuggestedReviewerInfo;
@@ -95,6 +96,9 @@ public interface ChangeApi {
*/
ChangeApi revert(RevertInput in) throws RestApiException;
/** Create a merge patch set for the change. */
ChangeInfo createMergePatchSet(MergePatchSetInput in) throws RestApiException;
List<ChangeInfo> submittedTogether() throws RestApiException;
SubmittedTogetherInfo submittedTogether(
EnumSet<SubmittedTogetherOption> options) throws RestApiException;
@@ -412,5 +416,11 @@ public interface ChangeApi {
EnumSet<SubmittedTogetherOption> b) throws RestApiException {
throw new NotImplementedException();
}
@Override
public ChangeInfo createMergePatchSet(MergePatchSetInput in)
throws RestApiException {
throw new NotImplementedException();
}
}
}

View File

@@ -0,0 +1,21 @@
// Copyright (C) 2016 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.gerrit.extensions.common;
public class MergePatchSetInput {
public String subject;
public boolean inheritParent;
public MergeInput merge;
}