Patchwork D7405: perf: bool() elements of dirstate.status return instead of len()

login
register
mail settings
Submitter phabricator
Date Nov. 14, 2019, 9:12 p.m.
Message ID <differential-rev-PHID-DREV-2wfk6vmoey2nmibpdapk-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/43211/
State Superseded
Headers show

Comments

phabricator - Nov. 14, 2019, 9:12 p.m.
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  I'm about to make scmutil.status no longer have a len(), so we need to do
  something else to "use" the results in this perf method.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  contrib/perf.py

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/contrib/perf.py b/contrib/perf.py
--- a/contrib/perf.py
+++ b/contrib/perf.py
@@ -788,7 +788,7 @@ 
             s = dirstate.status(
                 m, subrepos=[], ignored=False, clean=False, unknown=unknown
             )
-            sum(map(len, s))
+            sum(map(bool, s))
 
         timer(status_dirstate)
     else: