rust/rhg/src/commands/status.rs
branchstable
changeset 50215 ae61851e6fe2
parent 50178 baa4e2c93642
child 50225 53ca3e3bc013
--- a/rust/rhg/src/commands/status.rs	Tue Feb 28 00:01:41 2023 +0100
+++ b/rust/rhg/src/commands/status.rs	Tue Feb 28 15:25:47 2023 +0100
@@ -19,6 +19,7 @@
 use hg::manifest::Manifest;
 use hg::matchers::{AlwaysMatcher, IntersectionMatcher};
 use hg::repo::Repo;
+use hg::utils::debug::debug_wait_for_file;
 use hg::utils::files::get_bytes_from_os_string;
 use hg::utils::files::get_bytes_from_path;
 use hg::utils::files::get_path_from_bytes;
@@ -409,6 +410,13 @@
             after_status,
         )?;
 
+    // Development config option to test write races
+    if let Err(e) =
+        debug_wait_for_file(&config, "status.pre-dirstate-write-file")
+    {
+        ui.write_stderr(e.as_bytes()).ok();
+    }
+
     if (fixup.is_empty() || filesystem_time_at_status_start.is_none())
         && !dirstate_write_needed
     {