mercurial/exchange.py
branchstable
changeset 51501 429d57227e7f
parent 51472 7752cf4f64cc
child 51502 3b69324d9535
--- a/mercurial/exchange.py	Mon Jun 10 10:59:44 2024 +0200
+++ b/mercurial/exchange.py	Tue Jun 11 11:13:36 2024 +0200
@@ -1694,10 +1694,10 @@
             )
 
     pullop.trmanager = transactionmanager(repo, b'pull', remote.url())
-    wlock = util.nullcontextmanager()
+    wlock = util.nullcontextmanager
     if not bookmod.bookmarksinstore(repo):
-        wlock = repo.wlock()
-    with wlock, repo.lock(), pullop.trmanager:
+        wlock = repo.wlock
+    with wlock(), repo.lock(), pullop.trmanager:
         if confirm or (
             repo.ui.configbool(b"pull", b"confirm") and not repo.ui.plain()
         ):