Read about our upcoming Code of Conduct on this issue

Commit 2ca0e4ee authored by timeless's avatar timeless
Browse files

contrib/perf: fix perffncachewrite

fncache.write requires a transaction (and thus a lock)
parent 964df7b4fb1b
......@@ -406,10 +406,13 @@ def perffncachewrite(ui, repo, **opts):
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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment