perf: simply use repo.store for perffncache* commands
authorAdrian Buehlmann <adrian@cadifra.com>
Fri, 12 Oct 2012 19:43:24 +0200
changeset 17780 769f66861eb8
parent 17779 f38e2873b48d
child 17781 8ce535745500
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.
contrib/perf.py
--- 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: