diff rust/hg-core/src/dirstate_tree/on_disk.rs @ 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 f8ec7b16c98f
children 1891086f6c7f
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?