diff -r eb11153c1698 -r 429d57227e7f mercurial/exchange.py --- 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() ):