(diagnosis: &atomic_repository::WorkingCopyRegistrationDiagnosis)
| 401 | } |
| 402 | |
| 403 | fn print_diagnosis(diagnosis: &atomic_repository::WorkingCopyRegistrationDiagnosis) { |
| 404 | print_info(&format!( |
| 405 | "Working copy {}: location {}; desired view {} ({}) at {}; observed {}; \ |
| 406 | materialized {}; target '{}' at {}", |
| 407 | diagnosis.working_copy, |
| 408 | if diagnosis.location_matches { |
| 409 | "matches" |
| 410 | } else { |
| 411 | "MISMATCH" |
| 412 | }, |
| 413 | diagnosis.desired_view_id, |
| 414 | diagnosis |
| 415 | .desired_view_name |
| 416 | .as_deref() |
| 417 | .unwrap_or("<missing>"), |
| 418 | diagnosis.desired_state, |
| 419 | diagnosis |
| 420 | .observed_desired_view_state |
| 421 | .map(|state| state.to_string()) |
| 422 | .unwrap_or_else(|| "<missing>".to_string()), |
| 423 | diagnosis |
| 424 | .materialized_state |
| 425 | .map(|state| state.to_string()) |
| 426 | .unwrap_or_else(|| "none".to_string()), |
| 427 | diagnosis.target_view_name, |
| 428 | diagnosis.target_view_state, |
| 429 | )); |
| 430 | if diagnosis.desired_view_is_stale { |
| 431 | print_warning( |
| 432 | "The recorded desired state no longer matches its view (stale registration).", |
| 433 | ); |
| 434 | } |
| 435 | } |
| 436 | |
| 437 | impl Command for RepairNativeIndexes { |
| 438 | fn run(&self) -> CliResult<()> { |
no test coverage detected