contrib/perf: fix perffncachewrite
authortimeless <timeless@mozdev.org>
Tue, 24 Nov 2015 22:01:11 +0000
changeset 27097 b3e24a9c5f9b
parent 27096 964df7b4fb1b
child 27098 64cb281d23a5
contrib/perf: fix perffncachewrite fncache.write requires a transaction (and thus a lock)
contrib/perf.py
--- a/contrib/perf.py	Tue Nov 24 20:05:15 2015 +0000
+++ b/contrib/perf.py	Tue Nov 24 22:01:11 2015 +0000
@@ -406,10 +406,13 @@
     timer, fm = gettimer(ui, opts)
     s = repo.store
     s.fncache._load()
+    lock = repo.lock()
+    tr = repo.transaction('perffncachewrite')
     def d():
         s.fncache._dirty = True
-        s.fncache.write()
+        s.fncache.write(tr)
     timer(d)
+    lock.release()
     fm.end()
 
 @command('perffncacheencode', formatteropts)