# HG changeset patch # User timeless # Date 2015-11-24 22:01:11 # Node ID b3e24a9c5f9b4bfd64bb40b4166f84bf74b7a25c # Parent 964df7b4fb1ba7e95f8097a46cda83ba38f6df2a contrib/perf: fix perffncachewrite fncache.write requires a transaction (and thus a lock) diff --git a/contrib/perf.py b/contrib/perf.py --- a/contrib/perf.py +++ b/contrib/perf.py @@ -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)