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

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Thu Nov 14 21:12:05 UTC 2019


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

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:



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


More information about the Mercurial-devel mailing list