(&self)
| 146 | |
| 147 | impl Command for UndoPathClaimsRepair { |
| 148 | fn run(&self) -> CliResult<()> { |
| 149 | use crate::output::{print_info, print_success, print_warning}; |
| 150 | let repo = match require_repository_for_native_repair(None) { |
| 151 | Ok(repo) => repo, |
| 152 | Err(error) => { |
| 153 | print_warning(&format!( |
| 154 | "The path-claims undo is unavailable because repository authority cannot be opened: {error}" |
| 155 | )); |
| 156 | return Err(error); |
| 157 | } |
| 158 | }; |
| 159 | print_info("Undoing the latest journaled path-claims repair under fresh leases..."); |
| 160 | match repo.undo_last_path_claims_repair() { |
| 161 | Ok(Some(outcome)) => { |
| 162 | print_success(&format!( |
| 163 | "Path-claims repair undone ({} row(s) restored); journaled as Undo operation {:?}", |
| 164 | outcome.rows_written, |
| 165 | outcome.operation |
| 166 | )); |
| 167 | } |
| 168 | Ok(None) => { |
| 169 | print_info("No journaled path-claims repair with a stored inverse exists; nothing to undo."); |
| 170 | } |
| 171 | Err(error) => { |
| 172 | print_warning(&format!( |
| 173 | "The path-claims undo refused (third-value rejection or failure): {error}" |
| 174 | )); |
| 175 | print_hint( |
| 176 | "The live table was not overwritten. Inspect with 'atomic doctor check' first.", |
| 177 | ); |
| 178 | return Err(crate::error::CliError::Repository(error)); |
| 179 | } |
| 180 | } |
| 181 | Ok(()) |
| 182 | } |
| 183 | } |
| 184 | |
| 185 | impl Command for RepairTreeBijection { |
nothing calls this directly
no test coverage detected