diff contrib/perf.py @ 14671:35c2cc322ba8

scmutil: switch match users to supplying contexts The most appropriate context is not always clearly defined. The obvious cases: For working directory commands, we use None For commands (eg annotate) with single revs, we use that revision The less obvious cases: For commands (eg status, diff) with a pair of revs, we use the second revision For commands that take a range (like log), we use None
author Matt Mackall <mpm@selenic.com>
date Sat, 18 Jun 2011 16:52:51 -0500
parents 1ffeeb91c55d
children 33fcad3cfbbc
line wrap: on
line diff
--- a/contrib/perf.py	Sat Jun 18 16:52:51 2011 -0500
+++ b/contrib/perf.py	Sat Jun 18 16:52:51 2011 -0500
@@ -31,11 +31,11 @@
 
 def perfwalk(ui, repo, *pats):
     try:
-        m = scmutil.match(repo, pats, {})
+        m = scmutil.match(repo[None], pats, {})
         timer(lambda: len(list(repo.dirstate.walk(m, [], True, False))))
     except:
         try:
-            m = scmutil.match(repo, pats, {})
+            m = scmutil.match(repo[None], pats, {})
             timer(lambda: len([b for a, b, c in repo.dirstate.statwalk([], m)]))
         except:
             timer(lambda: len(list(cmdutil.walk(repo, pats, {}))))