# HG changeset patch # User Martin von Zweigbergk # Date 1506720221 25200 # Node ID b3538c03a8040c4f7904a83f1a8957ba528515e0 # Parent 01e8ab4b657351aa3fd3c5c717649567c8876a59 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 diff -r 01e8ab4b6573 -r b3538c03a804 contrib/perf.py --- 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)