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

Function record

libatomic/tests/sandbox_service_test.rs:80–92  ·  view source on GitHub ↗

Record everything in `repo`'s working tree and land it: on the host, applied locally; in a sandbox's cache, submitted through the service.

(repo: &Repository, message: &str)

Source from the content-addressed store, hash-verified

78/// Record everything in `repo`'s working tree and land it: on the host,
79/// applied locally; in a sandbox's cache, submitted through the service.
80fn record(repo: &Repository, message: &str) -> Result<Hash, String> {
81 let outcome = repo
82 .record(
83 repo.require_working_copy_id().unwrap(),
84 header(message),
85 record_options().apply_after_record(true),
86 )
87 .map_err(|e| e.to_string())?;
88 if !outcome.was_applied() {
89 return Err(format!("record did not apply: {:?}", outcome.errors()));
90 }
91 Ok(*outcome.hash())
92}
93
94fn host() -> Host {
95 host_with(DaemonState::new())

Calls 8

apply_after_recordMethod · 0.80
was_appliedMethod · 0.80
headerFunction · 0.70
record_optionsFunction · 0.70
recordMethod · 0.45
unwrapMethod · 0.45
hashMethod · 0.45

Tested by

no test coverage detected