comparison mercurial/ui.py @ 32104:f06d23af6cdf stable

pager: rename 'pager.enable' to 'ui.paginate' This aligns with what we do for color (see 7fec37746417). Pager is a central enough notion that having the master config in the [ui] section makes senses. It will helps with consistency, discoverability. It will also help having a simple and clear example hgrc mentioning pager. The previous form of the option had never been released in a non-rc version but we keep it around for convenience. If both are set, 'ui.pager' take priority.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Mon, 01 May 2017 16:36:50 +0200
parents 21eb863187ea
children 2384a6546927
comparison
equal deleted inserted replaced
32103:9a98023ac8db 32104:f06d23af6cdf
53 53
54 # uncomment to disable color in command output 54 # uncomment to disable color in command output
55 # (see 'hg help color' for details) 55 # (see 'hg help color' for details)
56 # color = never 56 # color = never
57 57
58 [pager]
59 # uncomment to disable command output pagination 58 # uncomment to disable command output pagination
60 # (see 'hg help pager' for details) 59 # (see 'hg help pager' for details)
61 # enable = never 60 # paginate = never
62 61
63 [extensions] 62 [extensions]
64 # uncomment these lines to enable some popular extensions 63 # uncomment these lines to enable some popular extensions
65 # (see 'hg help extensions' for more info) 64 # (see 'hg help extensions' for more info)
66 # 65 #
106 [ui] 105 [ui]
107 # uncomment to disable color in command output 106 # uncomment to disable color in command output
108 # (see 'hg help color' for details) 107 # (see 'hg help color' for details)
109 # color = never 108 # color = never
110 109
111 [pager]
112 # uncomment to disable command output pagination 110 # uncomment to disable command output pagination
113 # (see 'hg help pager' for details) 111 # (see 'hg help pager' for details)
114 # enable = never 112 # paginate = never
115 113
116 [extensions] 114 [extensions]
117 # uncomment these lines to enable some popular extensions 115 # uncomment these lines to enable some popular extensions
118 # (see 'hg help extensions' for more info) 116 # (see 'hg help extensions' for more info)
119 # 117 #
856 not "history, "summary" not "summ", etc. 854 not "history, "summary" not "summ", etc.
857 """ 855 """
858 if (self._disablepager 856 if (self._disablepager
859 or self.pageractive 857 or self.pageractive
860 or command in self.configlist('pager', 'ignore') 858 or command in self.configlist('pager', 'ignore')
861 or not self.configbool('pager', 'enable', True) 859 or not self.configbool('ui', 'paginate',
860 self.configbool('pager', 'enable', True))
862 or not self.configbool('pager', 'attend-' + command, True) 861 or not self.configbool('pager', 'attend-' + command, True)
863 # TODO: if we want to allow HGPLAINEXCEPT=pager, 862 # TODO: if we want to allow HGPLAINEXCEPT=pager,
864 # formatted() will need some adjustment. 863 # formatted() will need some adjustment.
865 or not self.formatted() 864 or not self.formatted()
866 or self.plain() 865 or self.plain()