mercurial/merge.py
changeset 45462 c1d6e930ac8a
parent 45459 ccd3bf4490c1
child 45466 14b3dbfa4eeb
--- a/mercurial/merge.py	Fri Jun 19 06:15:06 2020 +0200
+++ b/mercurial/merge.py	Mon Sep 14 11:32:24 2020 -0400
@@ -1698,6 +1698,15 @@
     fsmonitorthreshold = repo.ui.configint(
         b'fsmonitor', b'warn_update_file_count'
     )
+    # avoid cycle dirstate -> sparse -> merge -> dirstate
+    from . import dirstate
+
+    if dirstate.rustmod is not None:
+        # When using rust status, fsmonitor becomes necessary at higher sizes
+        fsmonitorthreshold = repo.ui.configint(
+            b'fsmonitor', b'warn_update_file_count_rust',
+        )
+
     try:
         # avoid cycle: extensions -> cmdutil -> merge
         from . import extensions