From 017e34539c7f9831afd2771d7eb2c052628ff317 Mon Sep 17 00:00:00 2001 From: Googler Date: Thu, 28 Mar 2024 14:31:10 -0700 Subject: [PATCH] Implement ListChanges method of Piper API in intellij-ext Implement ListChanges method of Piper API in intellij-ext PiperOrigin-RevId: 620058821 --- .../perforce/get_client_context_rpc.proto | 3 +- ext/proto/perforce/integrate_rpc.proto | 4 +- ext/proto/perforce/patch_rpc.proto | 5 +- ext/proto/perforce/revert_files_rpc.proto | 1 - ext/proto/perforce/service.proto | 81 +++++++++++++++++++ 5 files changed, 88 insertions(+), 6 deletions(-) diff --git a/ext/proto/perforce/get_client_context_rpc.proto b/ext/proto/perforce/get_client_context_rpc.proto index b617ce9e6e7..207af38f415 100644 --- a/ext/proto/perforce/get_client_context_rpc.proto +++ b/ext/proto/perforce/get_client_context_rpc.proto @@ -3,7 +3,6 @@ syntax = "proto2"; package com.google.idea.blaze.ext.perforce; import "ext/proto/perforce/base.proto"; -import "ext/proto/perforce/status.proto"; option java_package = "com.google.idea.blaze.ext.p4"; @@ -14,4 +13,4 @@ message GetClientContextRequest { message GetClientContextResponse { optional string workspace_name = 1; optional string workspace_id = 2; -} \ No newline at end of file +} diff --git a/ext/proto/perforce/integrate_rpc.proto b/ext/proto/perforce/integrate_rpc.proto index 19985f46940..4e34ee4b326 100644 --- a/ext/proto/perforce/integrate_rpc.proto +++ b/ext/proto/perforce/integrate_rpc.proto @@ -3,7 +3,6 @@ syntax = "proto2"; package com.google.idea.blaze.ext.perforce; import "ext/proto/perforce/base.proto"; -import "ext/proto/perforce/source_file.proto"; import "ext/proto/perforce/status.proto"; option java_package = "com.google.idea.blaze.ext.p4"; @@ -28,4 +27,5 @@ message IntegrateFilesRequest { message IntegrateFilesResponse { optional string destination_file = 3; -} \ No newline at end of file + optional PerforceStatus perforce_status = 1002; +} diff --git a/ext/proto/perforce/patch_rpc.proto b/ext/proto/perforce/patch_rpc.proto index d46f7b92853..e48c329d78b 100644 --- a/ext/proto/perforce/patch_rpc.proto +++ b/ext/proto/perforce/patch_rpc.proto @@ -3,6 +3,7 @@ syntax = "proto2"; package com.google.idea.blaze.ext.perforce; import "ext/proto/perforce/base.proto"; +import "ext/proto/perforce/status.proto"; option java_package = "com.google.idea.blaze.ext.p4"; @@ -18,4 +19,6 @@ message PatchChangeRequest { optional string custom_description_prefix = 8; } -message PatchChangeResponse {} \ No newline at end of file +message PatchChangeResponse { + optional PerforceStatus perforce_status = 1002; +} diff --git a/ext/proto/perforce/revert_files_rpc.proto b/ext/proto/perforce/revert_files_rpc.proto index 5011f89746e..38cf470a674 100644 --- a/ext/proto/perforce/revert_files_rpc.proto +++ b/ext/proto/perforce/revert_files_rpc.proto @@ -3,7 +3,6 @@ syntax = "proto2"; package com.google.idea.blaze.ext.perforce; import "ext/proto/perforce/base.proto"; -import "ext/proto/perforce/source_file.proto"; import "ext/proto/perforce/status.proto"; option java_package = "com.google.idea.blaze.ext.p4"; diff --git a/ext/proto/perforce/service.proto b/ext/proto/perforce/service.proto index 7366a87c9e9..f5e0b0e7a31 100644 --- a/ext/proto/perforce/service.proto +++ b/ext/proto/perforce/service.proto @@ -2,10 +2,22 @@ syntax = "proto2"; package com.google.idea.blaze.ext.perforce; +import "ext/proto/perforce/annotation_rpc.proto"; import "ext/proto/perforce/change_rpc.proto"; +import "ext/proto/perforce/depot_file_rpc.proto"; import "ext/proto/perforce/file_content_rpc.proto"; import "ext/proto/perforce/file_state_rpc.proto"; +import "ext/proto/perforce/get_client_context_rpc.proto"; +import "ext/proto/perforce/integrate_rpc.proto"; +import "ext/proto/perforce/mail_change_rpc.proto"; +import "ext/proto/perforce/patch_rpc.proto"; import "ext/proto/perforce/resolve_conflicts_rpc.proto"; +import "ext/proto/perforce/revert_files_rpc.proto"; +import "ext/proto/perforce/submit_change_rpc.proto"; +import "ext/proto/perforce/switch_client_rpc.proto"; +import "ext/proto/perforce/sync_files_rpc.proto"; +import "ext/proto/perforce/upload_change_rpc.proto"; +import "ext/proto/perforce/workspace_file_rpc.proto"; import "ext/proto/perforce/workspace_rpc.proto"; option java_multiple_files = true; @@ -35,4 +47,73 @@ service PiperService { // Update the state and type of files that are open in a Piper workspace. rpc UpdateFileStates(UpdateFileStatesRequest) returns (stream UpdateFileStatesResponse) {} + + // Delete a change. + rpc DeleteChange(DeleteChangeRequest) returns (DeleteChangeResponse) {} + + // Retrieve annotations for files stored in the Piper depot. + rpc GetAnnotations(GetAnnotationsRequest) + returns (stream GetAnnotationsResponse) {} + + // A single RPC version of GetChanges. If you're querying multiple changes at + // once, please use GetChanges. + rpc GetChange(GetChangeRequest) returns (GetChangeResponse) {} + + // Gets client context + rpc GetClientContext(GetClientContextRequest) + returns (GetClientContextResponse) {} + + // Integrates revisions from one branch to another. + rpc IntegrateFiles(IntegrateFilesRequest) + returns (stream IntegrateFilesResponse) {} + + // Search for matching files and return metadata about each match. + rpc ListDepotFiles(ListDepotFilesRequest) + returns (stream ListDepotFilesResponse) {} + + // Search for matching changes and return metadata about each match. + rpc ListChanges(ListChangesRequest) returns (stream ListChangesResponse) {} + + // Search for matching files in the workspace and return metadata about each + // match. + rpc ListWorkspaceFiles(ListWorkspaceFilesRequest) + returns (stream ListWorkspaceFilesResponse) {} + + // Searches for matching workspaces, and retrieves metadata for each match. + rpc ListWorkspaces(ListWorkspacesRequest) + returns (stream ListWorkspacesResponse) {} + + // List CitC switch clients of a user. Similar to p4 switches. + rpc ListSwitchClients(ListSwitchClientsRequest) + returns (ListSwitchClientsResponse) {} + + // Move (rename) file(s) in a workspace. + rpc MoveFiles(MoveFilesRequest) returns (stream MoveFilesResponse) {} + + // Patches a change to a workspace. + rpc PatchChange(PatchChangeRequest) returns (PatchChangeResponse) {} + + // Reverts files that are open in a Piper workspace. + rpc RevertFiles(RevertFilesRequest) returns (stream RevertFilesResponse) {} + + // Update the revision and content of files that are in a Piper workspace. + rpc SyncFiles(SyncFilesRequest) returns (stream SyncFilesResponse) {} + + // Edit/Create a change. + rpc UpdateChange(UpdateChangeRequest) returns (UpdateChangeResponse) {} + + // Updates a CitC switch client to point to the new target or create a new + // switch client with the new target. + rpc UpdateSwitchClient(UpdateSwitchClientRequest) + returns (UpdateSwitchClientResponse) {} + + // Uploads a pending change to Critique. + rpc UploadChangeToCritique(UploadChangeToCritiqueRequest) + returns (UploadChangeToCritiqueResponse) {} + + // Runs presubmits and/or submits a numbered pending change. + rpc SubmitChange(SubmitChangeRequest) returns (stream SubmitChangeResponse) {} + + // Runs presubmits and mails pending change for review. + rpc MailChange(MailChangeRequest) returns (stream MailChangeResponse) {} }