##// END OF EJS Templates
rust-dirstate-v2: fix the unused bytes counter when rewriting the dirstate...
Raphaël Gomès -
r50050:09984dc7 stable
parent child Browse files
Show More
@@ -622,13 +622,18 b' pub(super) fn write('
622
622
623 let root_nodes = writer.write_nodes(dirstate_map.root.as_ref())?;
623 let root_nodes = writer.write_nodes(dirstate_map.root.as_ref())?;
624
624
625 let unreachable_bytes = if append {
626 dirstate_map.unreachable_bytes
627 } else {
628 0
629 };
625 let meta = TreeMetadata {
630 let meta = TreeMetadata {
626 root_nodes,
631 root_nodes,
627 nodes_with_entry_count: dirstate_map.nodes_with_entry_count.into(),
632 nodes_with_entry_count: dirstate_map.nodes_with_entry_count.into(),
628 nodes_with_copy_source_count: dirstate_map
633 nodes_with_copy_source_count: dirstate_map
629 .nodes_with_copy_source_count
634 .nodes_with_copy_source_count
630 .into(),
635 .into(),
631 unreachable_bytes: dirstate_map.unreachable_bytes.into(),
636 unreachable_bytes: unreachable_bytes.into(),
632 unused: [0; 4],
637 unused: [0; 4],
633 ignore_patterns_hash: dirstate_map.ignore_patterns_hash,
638 ignore_patterns_hash: dirstate_map.ignore_patterns_hash,
634 };
639 };
@@ -195,8 +195,7 b' Delete most of the dirstate to trigger a'
195 Check that unused bytes counter is reset when creating a new docket
195 Check that unused bytes counter is reset when creating a new docket
196
196
197 $ hg debugstate --docket | grep unused
197 $ hg debugstate --docket | grep unused
198 number of unused bytes: 0 (no-rust !)
198 number of unused bytes: 0
199 number of unused bytes: [1-9]\d* (re) (rust known-bad-output !)
200
199
201 #endif
200 #endif
202
201
General Comments 0
You need to be logged in to leave comments. Login now