diff mercurial/localrepo.py @ 51448:9da3fcc5f70f stable

test-lock: use synchronisation file instead of sleep This will prevent the test to be flaky on load.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 11 Mar 2024 16:05:28 +0100
parents 04111ef08fb0
children fcc149f3fdcb 0239ebdd0740
line wrap: on
line diff
--- a/mercurial/localrepo.py	Mon Mar 11 13:36:25 2024 +0100
+++ b/mercurial/localrepo.py	Mon Mar 11 16:05:28 2024 +0100
@@ -3072,6 +3072,9 @@
             warntimeout = self.ui.configint(b"ui", b"timeout.warn")
         # internal config: ui.signal-safe-lock
         signalsafe = self.ui.configbool(b'ui', b'signal-safe-lock')
+        sync_file = self.ui.config(b'devel', b'lock-wait-sync-file')
+        if not sync_file:
+            sync_file = None
 
         l = lockmod.trylock(
             self.ui,
@@ -3083,6 +3086,7 @@
             acquirefn=acquirefn,
             desc=desc,
             signalsafe=signalsafe,
+            devel_wait_sync_file=sync_file,
         )
         return l