mercurial/debugcommands.py
changeset 33438 8056481caa81
parent 33336 4672db164c98
child 33493 9a9f95214f46
--- a/mercurial/debugcommands.py	Mon Aug 08 18:14:42 2016 +0200
+++ b/mercurial/debugcommands.py	Thu Jul 13 18:31:35 2017 -0700
@@ -2177,9 +2177,8 @@
 @command('debugupdatecaches', [])
 def debugupdatecaches(ui, repo, *pats, **opts):
     """warm all known caches in the repository"""
-    with repo.wlock():
-        with repo.lock():
-            repo.updatecaches()
+    with repo.wlock(), repo.lock():
+        repo.updatecaches()
 
 @command('debugupgraderepo', [
     ('o', 'optimize', [], _('extra optimization to perform'), _('NAME')),