changeset 43753:2276a9a1c037

repoview: add a 'devel.debug.repo-filter' option If set, there will be debug message when a filter computation is triggered. This is going to be useful to remove various filtering trigger and to test they do not get reintroduced. Differential Revision: https://phab.mercurial-scm.org/D7476
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 17 Nov 2019 05:32:38 +0100
parents 657bdb724b47
children 02ededbef627
files mercurial/configitems.py mercurial/repoview.py
diffstat 2 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/configitems.py	Thu Nov 21 17:54:25 2019 +0100
+++ b/mercurial/configitems.py	Sun Nov 17 05:32:38 2019 +0100
@@ -433,6 +433,9 @@
     b'devel', b'debug.extensions', default=False,
 )
 coreconfigitem(
+    b'devel', b'debug.repo-filters', default=False,
+)
+coreconfigitem(
     b'devel', b'debug.peer-request', default=False,
 )
 coreconfigitem(
--- a/mercurial/repoview.py	Thu Nov 21 17:54:25 2019 +0100
+++ b/mercurial/repoview.py	Sun Nov 17 05:32:38 2019 +0100
@@ -217,6 +217,9 @@
     hidden-state and must be visible. They are dynamic and hence we should not
     cache it's result"""
     if filtername not in repo.filteredrevcache:
+        if repo.ui.configbool(b'devel', b'debug.repo-filters'):
+            msg = b'debug.filters: computing revision filter for "%s"\n'
+            repo.ui.debug(msg % filtername)
         func = filtertable[filtername]
         if visibilityexceptions:
             return func(repo.unfiltered, visibilityexceptions)