rust-dirstate: trace append/no append to help debugging stable
authorRaphaël Gomès <rgomes@octobus.net>
Thu, 08 Dec 2022 16:38:39 +0100
branchstable
changeset 50179 f2e13d8d30e0
parent 50178 baa4e2c93642
child 50180 be019ac8c1e4
rust-dirstate: trace append/no append to help debugging
rust/hg-core/src/dirstate_tree/on_disk.rs
--- a/rust/hg-core/src/dirstate_tree/on_disk.rs	Mon Dec 12 16:38:05 2022 +0100
+++ b/rust/hg-core/src/dirstate_tree/on_disk.rs	Thu Dec 08 16:38:39 2022 +0100
@@ -637,6 +637,11 @@
     can_append: bool,
 ) -> Result<(Vec<u8>, TreeMetadata, bool, usize), DirstateError> {
     let append = can_append && dirstate_map.write_should_append();
+    if append {
+        log::trace!("appending to the dirstate data file");
+    } else {
+        log::trace!("creating new dirstate data file");
+    }
 
     // This ignores the space for paths, and for nodes without an entry.
     // TODO: better estimate? Skip the `Vec` and write to a file directly?