diff mercurial/dirstateutils/v2.py @ 48231:0524c1359bfc

dirstate-v2: Extend node flags to 16 bits Only 7 out of 8 available bits are used right now. Reserve some more. Future versions of Mercurial may assign meaning to some of these bits, with the limitation that then-older versions will always reset those bits to unset when writing nodes. (A new node is written for any mutation in its subtree, leaving the bytes of the old node unreachable until the data file is rewritten entirely.) Differential Revision: https://phab.mercurial-scm.org/D11661
author Simon Sapin <simon.sapin@octobus.net>
date Thu, 14 Oct 2021 16:06:31 +0200
parents 50dca3aa5c3b
children dfc5a505ddc5
line wrap: on
line diff
--- a/mercurial/dirstateutils/v2.py	Thu Oct 14 08:58:07 2021 -0700
+++ b/mercurial/dirstateutils/v2.py	Thu Oct 14 16:06:31 2021 +0200
@@ -18,7 +18,7 @@
 # Must match the constant of the same name in
 # `rust/hg-core/src/dirstate_tree/on_disk.rs`
 TREE_METADATA_SIZE = 44
-NODE_SIZE = 43
+NODE_SIZE = 44
 
 
 # Must match the `TreeMetadata` Rust struct in
@@ -50,7 +50,7 @@
 # * 4 bytes: expected size
 # * 4 bytes: mtime seconds
 # * 4 bytes: mtime nanoseconds
-NODE = struct.Struct('>LHHLHLLLLBlll')
+NODE = struct.Struct('>LHHLHLLLLHlll')
 
 
 assert TREE_METADATA_SIZE == TREE_METADATA.size