mercurial/localrepo.py
changeset 51639 69c5f8d6c710
parent 51593 6378d57562af
parent 51632 fcc149f3fdcb
child 51678 c10fa6388dbf
--- a/mercurial/localrepo.py	Wed Sep 06 18:23:32 2023 +0200
+++ b/mercurial/localrepo.py	Wed Jun 12 11:29:11 2024 +0200
@@ -3122,6 +3122,7 @@
             l.lock()
             return l
 
+        self.hook(b'prelock', throw=True)
         l = self._lock(
             vfs=self.svfs,
             lockname=b"lock",
@@ -3146,6 +3147,7 @@
             l.lock()
             return l
 
+        self.hook(b'prewlock', throw=True)
         # We do not need to check for non-waiting lock acquisition.  Such
         # acquisition would not cause dead-lock as they would just fail.
         if wait and (