MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / run

Method run

atomic-cli/src/commands/doctor.rs:148–182  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

146
147impl 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
185impl Command for RepairTreeBijection {

Callers

nothing calls this directly

Calls 15

print_warningFunction · 0.85
print_infoFunction · 0.85
print_successFunction · 0.85
print_hintFunction · 0.85
RepositoryClass · 0.85
doctor_checkFunction · 0.85
print_diagnosisFunction · 0.85

Tested by

no test coverage detected