Mercurial > public > mercurial-scm > hg-stable
diff contrib/perf.py @ 38695:2cdb82e8fb44
perffncachewrite: load fncache after lock is acquired
Without this patch, running perffncachewrite on a repository destroy its
fncache.
Lock Acquisition drops various caches, including the fncache one. Then writing
of an non-loaded fncache result into an empty one.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Sat, 14 Jul 2018 02:09:47 +0200 |
parents | 55101513ed94 |
children | 1732db2f8210 a4d847cea6f8 |
line wrap: on
line diff
--- a/contrib/perf.py Fri Jun 22 11:02:42 2018 +0100 +++ b/contrib/perf.py Sat Jul 14 02:09:47 2018 +0200 @@ -980,9 +980,10 @@ def perffncachewrite(ui, repo, **opts): timer, fm = gettimer(ui, opts) s = repo.store + lock = repo.lock() s.fncache._load() - lock = repo.lock() tr = repo.transaction('perffncachewrite') + tr.addbackup('fncache') def d(): s.fncache._dirty = True s.fncache.write(tr)