Patchwork D845: perf: remove fallbacks to ancient versions of dirstate.walk()

login
register
mail settings
Submitter phabricator
Date Sept. 30, 2017, 6:28 a.m.
Message ID <ae61125180416d172bf01714ba803f7a@localhost.localdomain>
Download mbox | patch
Permalink /patch/24226/
State Not Applicable
Headers show

Comments

phabricator - Sept. 30, 2017, 6:28 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGb3538c03a804: perf: remove fallbacks to ancient versions of dirstate.walk() (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D845?vs=2165&id=2170

REVISION DETAIL
  https://phab.mercurial-scm.org/D845

AFFECTED FILES
  contrib/perf.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers, quark
Cc: quark, mercurial-devel

Patch

diff --git a/contrib/perf.py b/contrib/perf.py
--- a/contrib/perf.py
+++ b/contrib/perf.py
@@ -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)