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

Function late

libatomic/examples/replication_acceptance/fixture.rs:220–241  ·  view source on GitHub ↗
(root: &Path, fixture: &Fixture)

Source from the content-addressed store, hash-verified

218 graph
219}
220pub fn late(root: &Path, fixture: &Fixture) -> Result<(Hash, Hash)> {
221 let repo = Repository::open_existing(root)?;
222 let late = repo.save_provenance_graph(&graph(
223 Some(fixture.change),
224 Some(fixture.provenance),
225 "acceptance-session",
226 2,
227 &fixture.intent,
228 ))?;
229 let no_code = repo.save_provenance_graph(&graph(
230 None,
231 Some(late),
232 "acceptance-session",
233 3,
234 &fixture.intent,
235 ))?;
236 // Update only unhashed metadata under the same change identity.
237 let mut change = repo.load_change(&fixture.change)?;
238 change.unhashed = Some(json!({"display_marker":"late attachment update"}));
239 repo.save_change(&change)?;
240 Ok((late, no_code))
241}
242pub fn orphan(binary: &Path, root: &Path, config: &Path) -> Result<Hash> {
243 let mut repo = Repository::open_existing(root)?;
244 repo.create_draft_view("orphan", "dev")?;

Callers 1

runFunction · 0.85

Calls 4

graphFunction · 0.70
save_provenance_graphMethod · 0.45
load_changeMethod · 0.45
save_changeMethod · 0.45

Tested by

no test coverage detected