From patchwork Fri Oct 13 17:55:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [09,of,11] configitems: register the 'pager.attend-.*' options From: Boris Feld X-Patchwork-Id: 24846 Message-Id: <9f8f4614d1366eaeea13.1507917315@FB> To: mercurial-devel@mercurial-scm.org Date: Fri, 13 Oct 2017 19:55:15 +0200 # HG changeset patch # User Boris Feld # Date 1507681569 -7200 # Wed Oct 11 02:26:09 2017 +0200 # Node ID 9f8f4614d1366eaeea1366f9563a9db3a0811a9d # Parent 6ad9f6f42f33fe5efb78f76d39c41f28333144d6 # EXP-Topic config.register.ready # Available At https://bitbucket.org/octobus/mercurial-devel/ # hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 9f8f4614d136 configitems: register the 'pager.attend-.*' options diff --git a/hgext/pager.py b/hgext/pager.py --- a/hgext/pager.py +++ b/hgext/pager.py @@ -56,8 +56,8 @@ for cmd in cmds: var = 'attend-%s' % cmd - if ui.config('pager', var): - usepager = ui.configbool('pager', var) + if ui.config('pager', var, None): + usepager = ui.configbool('pager', var, True) break if (cmd in attend or (cmd not in ignore and not attend)): diff --git a/mercurial/configitems.py b/mercurial/configitems.py --- a/mercurial/configitems.py +++ b/mercurial/configitems.py @@ -552,6 +552,10 @@ generic=True, priority=-1, ) +coreconfigitem('pager', 'attend-.*', + default=dynamicdefault, + generic=True, +) coreconfigitem('pager', 'ignore', default=list, )