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

Function mapping

atomic-repository/src/repository/tests/ref_mapping_tests.rs:13–32  ·  view source on GitHub ↗
(view_id: u64)

Source from the content-addressed store, hash-verified

11use atomic_core::Hash;
12
13fn mapping(view_id: u64) -> atomic_core::pristine::RefMapping {
14 atomic_core::pristine::RefMapping {
15 version: REF_MAPPING_VERSION,
16 view_id,
17 view_name: "dev".to_string(),
18 scope: atomic_core::pristine::ViewScope::Shared as u8,
19 local_ref: Some("refs/heads/dev".to_string()),
20 remote: Some(("origin".to_string(), "refs/heads/dev".to_string())),
21 last_observed_local: Some("1111111111111111111111111111111111111111".to_string()),
22 last_observed_remote: None,
23 last_exported: Some("1111111111111111111111111111111111111111".to_string()),
24 last_exported_state: Some(
25 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".to_string(),
26 ),
27 last_observed_atomic: Some(
28 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".to_string(),
29 ),
30 status: RefSyncStatus::Synchronized,
31 }
32}
33
34fn view_id_of(repository: &Repository, name: &str) -> u64 {
35 let txn = repository.pristine().read_txn().expect("read txn");

Calls

no outgoing calls

Tested by

no test coverage detected