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

Function format_conflict_cleanup

atomic-cli/src/commands/record/format.rs:232–252  ·  view source on GitHub ↗

Render the scoped stale-conflict cleanup result. Shared by the ordinary record outcome path and the metadata-only narrow route so both report the same actual operation identity and cleared scope.

(
    view: &str,
    paths: &[String],
    rows_cleared: usize,
    operation: Option<atomic_core::OperationId>,
)

Source from the content-addressed store, hash-verified

230/// Shared by the ordinary record outcome path and the metadata-only narrow
231/// route so both report the same actual operation identity and cleared scope.
232pub(super) fn format_conflict_cleanup(
233 view: &str,
234 paths: &[String],
235 rows_cleared: usize,
236 operation: Option<atomic_core::OperationId>,
237) -> String {
238 let operation = operation
239 .map(|id| id.to_string())
240 .unwrap_or_else(|| "none".to_string());
241 let mut output = format!(
242 "Cleared stale conflict metadata on view '{}': {} row(s) across {} path(s)\n",
243 view,
244 rows_cleared,
245 paths.len()
246 );
247 for path in paths {
248 output.push_str(&format!(" cleared: {}\n", path));
249 }
250 output.push_str(&format!(" operation: {}\n", operation));
251 output
252}

Callers 1

format_outcomeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected