DiffWorkingCopy, collected: both backends stream; the CLI renders the whole listing.
(
&self,
request: pb::DiffWorkingCopyRequest,
)
| 384 | /// DiffWorkingCopy, collected: both backends stream; the CLI renders |
| 385 | /// the whole listing. |
| 386 | pub fn diff_working_copy( |
| 387 | &self, |
| 388 | request: pb::DiffWorkingCopyRequest, |
| 389 | ) -> CliResult<Vec<pb::DiffChunk>> { |
| 390 | self.call(move |backend| async move { |
| 391 | match backend { |
| 392 | Backend::Local(state) => { |
| 393 | let stream = services::QueryImpl { state } |
| 394 | .diff_working_copy(Request::new(request)) |
| 395 | .await? |
| 396 | .into_inner(); |
| 397 | collect_chunks(Box::pin(stream)).await |
| 398 | } |
| 399 | Backend::Reactor(channel) => { |
| 400 | let mut query = |
| 401 | pb::repository_query_service_client::RepositoryQueryServiceClient::new( |
| 402 | channel, |
| 403 | ); |
| 404 | let stream = query.diff_working_copy(request).await?.into_inner(); |
| 405 | collect_streaming(stream).await |
| 406 | } |
| 407 | } |
| 408 | }) |
| 409 | } |
| 410 | |
| 411 | /// The view-pair Diff, collected (same rendering as the working copy). |
| 412 | pub fn diff(&self, request: pb::DiffRequest) -> CliResult<Vec<pb::DiffChunk>> { |
no test coverage detected