mercurial/dirstateutils/v2.py
changeset 48231 0524c1359bfc
parent 48228 50dca3aa5c3b
child 48251 dfc5a505ddc5
equal deleted inserted replaced
48230:7ed0fc687220 48231:0524c1359bfc
    16 
    16 
    17 
    17 
    18 # Must match the constant of the same name in
    18 # Must match the constant of the same name in
    19 # `rust/hg-core/src/dirstate_tree/on_disk.rs`
    19 # `rust/hg-core/src/dirstate_tree/on_disk.rs`
    20 TREE_METADATA_SIZE = 44
    20 TREE_METADATA_SIZE = 44
    21 NODE_SIZE = 43
    21 NODE_SIZE = 44
    22 
    22 
    23 
    23 
    24 # Must match the `TreeMetadata` Rust struct in
    24 # Must match the `TreeMetadata` Rust struct in
    25 # `rust/hg-core/src/dirstate_tree/on_disk.rs`. See doc-comments there.
    25 # `rust/hg-core/src/dirstate_tree/on_disk.rs`. See doc-comments there.
    26 #
    26 #
    48 # * 4 bytes: number of descendant nodes that have a "tracked" state
    48 # * 4 bytes: number of descendant nodes that have a "tracked" state
    49 # * 1 byte: flags
    49 # * 1 byte: flags
    50 # * 4 bytes: expected size
    50 # * 4 bytes: expected size
    51 # * 4 bytes: mtime seconds
    51 # * 4 bytes: mtime seconds
    52 # * 4 bytes: mtime nanoseconds
    52 # * 4 bytes: mtime nanoseconds
    53 NODE = struct.Struct('>LHHLHLLLLBlll')
    53 NODE = struct.Struct('>LHHLHLLLLHlll')
    54 
    54 
    55 
    55 
    56 assert TREE_METADATA_SIZE == TREE_METADATA.size
    56 assert TREE_METADATA_SIZE == TREE_METADATA.size
    57 assert NODE_SIZE == NODE.size
    57 assert NODE_SIZE == NODE.size
    58 
    58