diff contrib/perf.py @ 14322:a90131b85fd8

scmutil: drop aliases in cmdutil for match functions
author Matt Mackall <mpm@selenic.com>
date Fri, 13 May 2011 14:58:24 -0500
parents 9f707b297b0f
children 1ffeeb91c55d
line wrap: on
line diff
--- a/contrib/perf.py	Fri May 13 14:48:48 2011 -0500
+++ b/contrib/perf.py	Fri May 13 14:58:24 2011 -0500
@@ -1,7 +1,7 @@
 # perf.py - performance test routines
 '''helper extension to measure performance'''
 
-from mercurial import cmdutil, match, commands
+from mercurial import cmdutil, scmutil, match, commands
 import time, os, sys
 
 def timer(func, title=None):
@@ -31,11 +31,11 @@
 
 def perfwalk(ui, repo, *pats):
     try:
-        m = cmdutil.match(repo, pats, {})
+        m = scmutil.match(repo, pats, {})
         timer(lambda: len(list(repo.dirstate.walk(m, [], True, False))))
     except:
         try:
-            m = cmdutil.match(repo, pats, {})
+            m = scmutil.match(repo, pats, {})
             timer(lambda: len([b for a, b, c in repo.dirstate.statwalk([], m)]))
         except:
             timer(lambda: len(list(cmdutil.walk(repo, pats, {}))))