Use /changes/{id}/revisions/{sha1}/submit to submit changes

Replace the legacy JSON-RPC invocation with a new REST style API that
names the patch set being submitted in the URI. Callers that don't
care can use /changes/{id}/submit to submit whatever the current patch
set is at the time the call starts at the server.

The input is trivial, an optional boolean indicating if the caller
wants to wait for the merge operation to execute now, or just have
it schedule in the background to complete some time later. Web UI
and SSH both set wait_for_merge true to match the old behavior.

The logic to identify an error message written by the server is now
part of the server rather than being buried in the client UI and is
also now reported over SSH if there is an error.

Change-Id: Ibade3bda3e716c789522da7ce14b284e07df08bc
This commit is contained in:
Shawn O. Pearce
2012-11-26 17:00:33 -08:00
parent 327048b612
commit 230343b94d
18 changed files with 448 additions and 349 deletions

View File

@@ -25,10 +25,6 @@ import com.google.gwtjsonrpc.common.RpcImpl.Version;
@RpcImpl(version = Version.V2_0)
public interface ChangeManageService extends RemoteJsonService {
@Audit
@SignInRequired
void submit(PatchSet.Id patchSetId, AsyncCallback<ChangeDetail> callback);
@Audit
@SignInRequired
void createNewPatchSet(final PatchSet.Id patchSetId, final String newCommitMessage,