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