debugbuilddag: take wlock to cover '.hg/localtags'
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Sun, 07 Aug 2016 17:15:19 +0200
changeset 29767 b37f65b047c7
parent 29766 b303b3817d0e
child 29768 46d9a5bb2fb0
debugbuilddag: take wlock to cover '.hg/localtags' This debug command can write local tags. local tags are in the .hg directory and should be covered by the 'wlock'. This is now covered.
mercurial/commands.py
--- a/mercurial/commands.py	Mon Aug 08 17:33:45 2016 +0200
+++ b/mercurial/commands.py	Sun Aug 07 17:15:19 2016 +0200
@@ -1987,8 +1987,9 @@
 
     tags = []
 
-    lock = tr = None
+    wlock = lock = tr = None
     try:
+        wlock = repo.wlock()
         lock = repo.lock()
         tr = repo.transaction("builddag")
 
@@ -2073,7 +2074,7 @@
             repo.vfs.write("localtags", "".join(tags))
     finally:
         ui.progress(_('building'), None)
-        release(tr, lock)
+        release(tr, lock, wlock)
 
 @command('debugbundle',
         [('a', 'all', None, _('show all details')),