##// END OF EJS Templates
ui: enable pager always for explicit --pager=on (issue5580)...
FUJIWARA Katsunori -
r33622:cc047a73 stable
parent child Browse files
Show More
@@ -828,6 +828,7 b' def _dispatch(req):'
828 color.setup(ui_)
828 color.setup(ui_)
829
829
830 if util.parsebool(options['pager']):
830 if util.parsebool(options['pager']):
831 # ui.pager() expects 'internal-always-' prefix in this case
831 ui.pager('internal-always-' + cmd)
832 ui.pager('internal-always-' + cmd)
832 elif options['pager'] != 'auto':
833 elif options['pager'] != 'auto':
833 ui.disablepager()
834 ui.disablepager()
@@ -945,8 +945,14 b' class ui(object):'
945 not "history, "summary" not "summ", etc.
945 not "history, "summary" not "summ", etc.
946 """
946 """
947 if (self._disablepager
947 if (self._disablepager
948 or self.pageractive
948 or self.pageractive):
949 or command in self.configlist('pager', 'ignore')
949 # how pager should do is already determined
950 return
951
952 if not command.startswith('internal-always-') and (
953 # explicit --pager=on (= 'internal-always-' prefix) should
954 # take precedence over disabling factors below
955 command in self.configlist('pager', 'ignore')
950 or not self.configbool('ui', 'paginate')
956 or not self.configbool('ui', 'paginate')
951 or not self.configbool('pager', 'attend-' + command, True)
957 or not self.configbool('pager', 'attend-' + command, True)
952 # TODO: if we want to allow HGPLAINEXCEPT=pager,
958 # TODO: if we want to allow HGPLAINEXCEPT=pager,
@@ -80,6 +80,34 b' We can control the pager from the config'
80 paged! 'summary: modify a 10\n'
80 paged! 'summary: modify a 10\n'
81 paged! '\n'
81 paged! '\n'
82
82
83 explicit --pager=on should take precedence over other configurations
84 (issue5580)
85
86 $ cat >> $HGRCPATH <<EOF
87 > [ui]
88 > paginate = false
89 > EOF
90 $ hg log --limit 1 --pager=on
91 paged! 'changeset: 10:46106edeeb38\n'
92 paged! 'tag: tip\n'
93 paged! 'user: test\n'
94 paged! 'date: Thu Jan 01 00:00:00 1970 +0000\n'
95 paged! 'summary: modify a 10\n'
96 paged! '\n'
97
98 $ cat >> $HGRCPATH <<EOF
99 > [ui]
100 > # true is default value of ui.paginate
101 > paginate = true
102 > EOF
103 $ hg log --limit 1 --pager=off
104 changeset: 10:46106edeeb38
105 tag: tip
106 user: test
107 date: Thu Jan 01 00:00:00 1970 +0000
108 summary: modify a 10
109
110
83 We can enable the pager on id:
111 We can enable the pager on id:
84
112
85 BROKEN: should be paged
113 BROKEN: should be paged
General Comments 0
You need to be logged in to leave comments. Login now