changeset 50179:f2e13d8d30e0 stable

rust-dirstate: trace append/no append to help debugging
author Raphaël Gomès <rgomes@octobus.net>
date Thu, 08 Dec 2022 16:38:39 +0100
parents baa4e2c93642
children be019ac8c1e4
files rust/hg-core/src/dirstate_tree/on_disk.rs
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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?