# HG changeset patch # User Pierre-Yves David # Date 2019-11-17 04:32:38 # Node ID 0ddd97e45cc620ec43fa4bba1b7a9752896928f7 # Parent 8e2df30694de65740d08d535f19dc7f08dee8d9f 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 diff --git a/mercurial/configitems.py b/mercurial/configitems.py --- a/mercurial/configitems.py +++ b/mercurial/configitems.py @@ -433,6 +433,9 @@ coreconfigitem( 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( diff --git a/mercurial/repoview.py b/mercurial/repoview.py --- a/mercurial/repoview.py +++ b/mercurial/repoview.py @@ -217,6 +217,9 @@ def filterrevs(repo, filtername, visibil 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)