changeset 34349:b3538c03a804

perf: remove fallbacks to ancient versions of dirstate.walk() If the call to dirstate.walk() failed, we would try to fall back to older versions. These were removed in d3d1d39da2fa (walk: remove cmdutil.walk, 2008-05-12) and f8299c84b5b6 (dirstate: fold statwalk and walk, 2008-06-26). We don't care about testing performance of versions that old versions at this point, so let's clean up. Differential Revision: https://phab.mercurial-scm.org/D845
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 29 Sep 2017 14:23:41 -0700
parents 01e8ab4b6573
children 255c761a52db
files contrib/perf.py
diffstat 1 files changed, 2 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/perf.py	Tue Aug 29 00:21:25 2017 +0530
+++ b/contrib/perf.py	Fri Sep 29 14:23:41 2017 -0700
@@ -370,15 +370,8 @@
 @command('perfwalk', formatteropts)
 def perfwalk(ui, repo, *pats, **opts):
     timer, fm = gettimer(ui, opts)
-    try:
-        m = scmutil.match(repo[None], pats, {})
-        timer(lambda: len(list(repo.dirstate.walk(m, [], True, False))))
-    except Exception:
-        try:
-            m = scmutil.match(repo[None], pats, {})
-            timer(lambda: len([b for a, b, c in repo.dirstate.statwalk([], m)]))
-        except Exception:
-            timer(lambda: len(list(cmdutil.walk(repo, pats, {}))))
+    m = scmutil.match(repo[None], pats, {})
+    timer(lambda: len(list(repo.dirstate.walk(m, [], True, False))))
     fm.end()
 
 @command('perfannotate', formatteropts)