diff --git a/rust/hg-core/src/dirstate_tree/on_disk.rs b/rust/hg-core/src/dirstate_tree/on_disk.rs --- a/rust/hg-core/src/dirstate_tree/on_disk.rs +++ b/rust/hg-core/src/dirstate_tree/on_disk.rs @@ -47,16 +47,16 @@ pub(super) const IGNORE_PATTERNS_HASH_LEN: usize = 20; pub(super) type IgnorePatternsHash = [u8; IGNORE_PATTERNS_HASH_LEN]; -/// Must match the constant of the same name in -/// `mercurial/dirstateutils/docket.py` +/// Must match constants of the same names in `mercurial/dirstateutils/v2.py` const TREE_METADATA_SIZE: usize = 44; +const NODE_SIZE: usize = 43; /// Make sure that size-affecting changes are made knowingly #[allow(unused)] fn static_assert_size_of() { let _ = std::mem::transmute::; let _ = std::mem::transmute::; - let _ = std::mem::transmute::; + let _ = std::mem::transmute::; } // Must match `HEADER` in `mercurial/dirstateutils/docket.py` @@ -169,8 +169,8 @@ #[repr(C)] struct Entry { mode: I32Be, + size: I32Be, mtime: I32Be, - size: I32Be, } /// Duration since the Unix epoch