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

Method changes

atomic-cli/src/remote_sandbox.rs:264–288  ·  view source on GitHub ↗
(&self, root: &Path, hashes: Vec<Hash>)

Source from the content-addressed store, hash-verified

262 }
263
264 fn changes(&self, root: &Path, hashes: Vec<Hash>) -> Result<Vec<ChangeFile>, String> {
265 exchange(root, move |repository, target, channel| async move {
266 let response = sandbox_client(channel)
267 .get_changes(pb::GetChangesRequest {
268 repository: Some(repository),
269 hashes: hashes
270 .iter()
271 .map(libatomic::daemon::convert::hash_proto)
272 .collect(),
273 target: Some(target),
274 expected_snapshot: None,
275 })
276 .await
277 .map_err(refused)?
278 .into_inner();
279 match response.outcome.ok_or("no outcome in GetChanges")? {
280 pb::get_changes_response::Outcome::Changes(payload) => payload
281 .changes
282 .iter()
283 .map(wire::change_from_bundle)
284 .collect(),
285 pb::get_changes_response::Outcome::Refused(info) => Err(info.message),
286 }
287 })
288 }
289
290 fn publish_provenance(
291 &self,

Callers 2

print_word_diff_patchFunction · 0.45
print_unifiedMethod · 0.45

Calls 6

exchangeFunction · 0.85
sandbox_clientFunction · 0.85
get_changesMethod · 0.80
into_innerMethod · 0.45
collectMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected