diff contrib/perf.py @ 23878:37a92908a382

localrepo: remove all external users of localrepo.sopener This change touches every module in which repository.sopener was being used, and changes it for the equivalent repository.svfs. It should now be possible to remove localrepo.sopener.
author Angel Ezquerra <angel.ezquerra@gmail.com>
date Sun, 11 Jan 2015 00:25:54 +0100
parents 316ad725a1dd
children 389693a245fa
line wrap: on
line diff
--- a/contrib/perf.py	Thu Jan 15 23:17:12 2015 +0100
+++ b/contrib/perf.py	Sun Jan 11 00:25:54 2015 +0100
@@ -129,8 +129,8 @@
     import mercurial.manifest
     timer, fm = gettimer(ui)
     def t():
-        repo.changelog = mercurial.changelog.changelog(repo.sopener)
-        repo.manifest = mercurial.manifest.manifest(repo.sopener)
+        repo.changelog = mercurial.changelog.changelog(repo.svfs)
+        repo.manifest = mercurial.manifest.manifest(repo.svfs)
         repo._tags = None
         return len(repo.tags())
     timer(t)
@@ -269,7 +269,7 @@
     mercurial.revlog._prereadsize = 2**24 # disable lazy parser in old hg
     n = repo["tip"].node()
     def d():
-        cl = mercurial.revlog.revlog(repo.sopener, "00changelog.i")
+        cl = mercurial.revlog.revlog(repo.svfs, "00changelog.i")
         cl.rev(n)
     timer(d)
     fm.end()
@@ -312,7 +312,7 @@
     import mercurial.revlog
     mercurial.revlog._prereadsize = 2**24 # disable lazy parser in old hg
     n = repo[rev].node()
-    cl = mercurial.revlog.revlog(repo.sopener, "00changelog.i")
+    cl = mercurial.revlog.revlog(repo.svfs, "00changelog.i")
     def d():
         cl.rev(n)
         clearcaches(cl)
@@ -537,5 +537,5 @@
 
     Result is the number of markers in the repo."""
     timer, fm = gettimer(ui)
-    timer(lambda: len(obsolete.obsstore(repo.sopener)))
+    timer(lambda: len(obsolete.obsstore(repo.svfs)))
     fm.end()