(&self, root: &Path, hashes: Vec<Hash>)
| 328 | } |
| 329 | |
| 330 | fn changes(&self, root: &Path, hashes: Vec<Hash>) -> Result<Vec<ChangeFile>, String> { |
| 331 | let route = Self::route(root)?; |
| 332 | let service = SandboxImpl { |
| 333 | state: Arc::clone(&route.state), |
| 334 | }; |
| 335 | let response = route |
| 336 | .rt |
| 337 | .block_on( |
| 338 | service.get_changes(with_token( |
| 339 | GetChangesRequest { |
| 340 | repository: Some(route.repository.clone()), |
| 341 | hashes: hashes |
| 342 | .iter() |
| 343 | .map(libatomic::daemon::convert::hash_proto) |
| 344 | .collect(), |
| 345 | target: None, |
| 346 | expected_snapshot: None, |
| 347 | }, |
| 348 | &route.token, |
| 349 | )), |
| 350 | ) |
| 351 | .map_err(status_text)? |
| 352 | .into_inner(); |
| 353 | match response.outcome.ok_or("no outcome")? { |
| 354 | get_changes_response::Outcome::Changes(payload) => payload |
| 355 | .changes |
| 356 | .iter() |
| 357 | .map(wire::change_from_bundle) |
| 358 | .collect(), |
| 359 | get_changes_response::Outcome::Refused(info) => Err(info.message), |
| 360 | } |
| 361 | } |
| 362 | |
| 363 | fn publish_provenance( |
| 364 | &self, |
nothing calls this directly
no test coverage detected