--- 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