Re: [PATCH 2 of 2 pager-endgame] pager: add a config knob to just globally turn off the pager
> On Feb 22, 2017, at 09:33, Yuya Nishihara wrote: > > On Tue, 21 Feb 2017 16:18:13 -0500, Augie Fackler wrote: >> # HG changeset patch >> # User Augie Fackler >> # Date 1486505605 18000 >> # Tue Feb 07 17:13:25 2017 -0500 >> # Node ID 390e26db66994cc2f627933815db02353958289f >> # Parent 589dcabe2b7a2b9f2d49646d710335e5a70ad492 >> pager: add a config knob to just globally turn off the pager >> >> diff --git a/mercurial/help/pager.txt b/mercurial/help/pager.txt >> --- a/mercurial/help/pager.txt >> +++ b/mercurial/help/pager.txt >> @@ -26,3 +26,10 @@ you can use --pager=:: >> - require the pager: `yes` or `on`. >> - suppress the pager: `no` or `off` (any unrecognized value >> will also work). >> + >> +To globally turn off all attempts to use a pager, set:: >> + >> + [pager] >> + enable = false >> + >> +which will prevent the pager from running. >> diff --git a/mercurial/ui.py b/mercurial/ui.py >> --- a/mercurial/ui.py >> +++ b/mercurial/ui.py >> @@ -857,6 +857,7 @@ class ui(object): >> if (self._disablepager >> or self.pageractive >> or command in self.configlist('pager', 'ignore') >> +or not self.configbool('pager', 'enable', True) > > Perhaps disablepager() could be merged with this? I suppose it could, although I kind of like the explicitness of --pager=never overriding some well-intentioned extension that tries to turn the pager on for you. I don't feel strongly either way though. ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: [PATCH 2 of 2 pager-endgame] pager: add a config knob to just globally turn off the pager
On Tue, 21 Feb 2017 16:18:13 -0500, Augie Fackler wrote: > # HG changeset patch > # User Augie Fackler > # Date 1486505605 18000 > # Tue Feb 07 17:13:25 2017 -0500 > # Node ID 390e26db66994cc2f627933815db02353958289f > # Parent 589dcabe2b7a2b9f2d49646d710335e5a70ad492 > pager: add a config knob to just globally turn off the pager > > diff --git a/mercurial/help/pager.txt b/mercurial/help/pager.txt > --- a/mercurial/help/pager.txt > +++ b/mercurial/help/pager.txt > @@ -26,3 +26,10 @@ you can use --pager=:: >- require the pager: `yes` or `on`. >- suppress the pager: `no` or `off` (any unrecognized value >will also work). > + > +To globally turn off all attempts to use a pager, set:: > + > + [pager] > + enable = false > + > +which will prevent the pager from running. > diff --git a/mercurial/ui.py b/mercurial/ui.py > --- a/mercurial/ui.py > +++ b/mercurial/ui.py > @@ -857,6 +857,7 @@ class ui(object): > if (self._disablepager > or self.pageractive > or command in self.configlist('pager', 'ignore') > +or not self.configbool('pager', 'enable', True) Perhaps disablepager() could be merged with this? ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
[PATCH 2 of 2 pager-endgame] pager: add a config knob to just globally turn off the pager
# HG changeset patch # User Augie Fackler # Date 1486505605 18000 # Tue Feb 07 17:13:25 2017 -0500 # Node ID 390e26db66994cc2f627933815db02353958289f # Parent 589dcabe2b7a2b9f2d49646d710335e5a70ad492 pager: add a config knob to just globally turn off the pager diff --git a/mercurial/help/pager.txt b/mercurial/help/pager.txt --- a/mercurial/help/pager.txt +++ b/mercurial/help/pager.txt @@ -26,3 +26,10 @@ you can use --pager=:: - require the pager: `yes` or `on`. - suppress the pager: `no` or `off` (any unrecognized value will also work). + +To globally turn off all attempts to use a pager, set:: + + [pager] + enable = false + +which will prevent the pager from running. diff --git a/mercurial/ui.py b/mercurial/ui.py --- a/mercurial/ui.py +++ b/mercurial/ui.py @@ -857,6 +857,7 @@ class ui(object): if (self._disablepager or self.pageractive or command in self.configlist('pager', 'ignore') +or not self.configbool('pager', 'enable', True) or not self.configbool('pager', 'attend-' + command, True) # TODO: if we want to allow HGPLAINEXCEPT=pager, # formatted() will need some adjustment. ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel