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

Function write_edge_map_with_frontier

atomic-core/src/apply/edge.rs:105–129  ·  view source on GitHub ↗

Write an edge update using repository-verified causal knowledge.

(
    txn: &mut CachedWriteGraphTxn<'_, '_>,
    workspace: &mut Workspace,
    change_id: NodeId,
    edge_update: &EdgeUpdate<Option<Hash>>,
    change: &Change,
    verified_frontier: &VerifiedCaus

Source from the content-addressed store, hash-verified

103
104/// Write an edge update using repository-verified causal knowledge.
105pub fn write_edge_map_with_frontier(
106 txn: &mut CachedWriteGraphTxn<'_, '_>,
107 workspace: &mut Workspace,
108 change_id: NodeId,
109 edge_update: &EdgeUpdate<Option<Hash>>,
110 change: &Change,
111 verified_frontier: &VerifiedCausalFrontier,
112 detect_conflicts: bool,
113) -> Result<(), LocalApplyError> {
114 // Process each edge in the map
115 for edge in &edge_update.edges {
116 write_new_edge(
117 txn,
118 workspace,
119 change_id,
120 &edge_update.inode,
121 edge,
122 change,
123 verified_frontier,
124 detect_conflicts,
125 )?;
126 }
127
128 Ok(())
129}
130
131// ---------------------------------------------------------------------------
132// Vertex resolution helpers for the apply pipeline

Callers 2

write_edge_mapFunction · 0.85
write_hunkFunction · 0.85

Calls 1

write_new_edgeFunction · 0.85

Tested by

no test coverage detected