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

Function fetch_changes

atomic-repository/tests/it/remote_cache_parity_test.rs:93–106  ·  view source on GitHub ↗

Dependencies discovered while importing changes are fetched before the graph slice rebuilds the canonical path and attribute indexes.

(host: &Repository, cache: &Repository, view: &str)

Source from the content-addressed store, hash-verified

91/// Dependencies discovered while importing changes are fetched before the
92/// graph slice rebuilds the canonical path and attribute indexes.
93fn fetch_changes(host: &Repository, cache: &Repository, view: &str) {
94 loop {
95 let missing = cache.missing_sandbox_changes().unwrap();
96 if missing.is_empty() {
97 break;
98 }
99 let changes = host
100 .export_sandbox_changes(view, &missing)
101 .unwrap()
102 .unwrap();
103 assert_eq!(changes.len(), missing.len());
104 cache.hold_sandbox_changes(&changes).unwrap();
105 }
106}
107
108fn hydrate_cache(host: &Repository, cache: &Repository, view: &str) {
109 fetch_changes(host, cache, view);

Callers 2

hydrate_cacheFunction · 0.85

Calls 5

hold_sandbox_changesMethod · 0.80
unwrapMethod · 0.45
is_emptyMethod · 0.45

Tested by

no test coverage detected