changeset 27097:b3e24a9c5f9b

contrib/perf: fix perffncachewrite fncache.write requires a transaction (and thus a lock)
author timeless <timeless@mozdev.org>
date Tue, 24 Nov 2015 22:01:11 +0000
parents 964df7b4fb1b
children 64cb281d23a5
files contrib/perf.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)