changeset 17780:769f66861eb8

perf: simply use repo.store for perffncache* commands This makes sure that .hg/requires is observed and the correct kind of store object is created. Otherwise we might mutilate our test repos when experimenting with new repo formats.
author Adrian Buehlmann <adrian@cadifra.com>
date Fri, 12 Oct 2012 19:43:24 +0200
parents f38e2873b48d
children 8ce535745500
files contrib/perf.py
diffstat 1 files changed, 3 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/perf.py	Sun Oct 14 18:30:47 2012 +0200
+++ b/contrib/perf.py	Fri Oct 12 19:43:24 2012 +0200
@@ -180,15 +180,13 @@
     timer(lambda: scmutil.casecollisionauditor(ui, False, repo.dirstate))
 
 def perffncacheload(ui, repo):
-    from mercurial import scmutil, store
-    s = store.store(set(['store','fncache']), repo.path, scmutil.opener)
+    s = repo.store
     def d():
         s.fncache._load()
     timer(d)
 
 def perffncachewrite(ui, repo):
-    from mercurial import scmutil, store
-    s = store.store(set(['store','fncache']), repo.path, scmutil.opener)
+    s = repo.store
     s.fncache._load()
     def d():
         s.fncache._dirty = True
@@ -196,9 +194,7 @@
     timer(d)
 
 def perffncacheencode(ui, repo):
-    from mercurial import store
-    s = store.store(set(['store','fncache','dotencode']),
-                    repo.path, scmutil.opener)
+    s = repo.store
     s.fncache._load()
     def d():
         for p in s.fncache.entries: