Show More
@@ -869,7 +869,6 b' class ui(object):' | |||||
869 | # interactive, the user didn't say HGPLAIN or |
|
869 | # interactive, the user didn't say HGPLAIN or | |
870 | # HGPLAINEXCEPT=pager, and the user didn't specify --debug. |
|
870 | # HGPLAINEXCEPT=pager, and the user didn't specify --debug. | |
871 | return |
|
871 | return | |
872 | self.debug('starting pager for command %r\n' % command) |
|
|||
873 |
|
872 | |||
874 | # TODO: add a "system defaults" config section so this default |
|
873 | # TODO: add a "system defaults" config section so this default | |
875 | # of more(1) can be easily replaced with a global |
|
874 | # of more(1) can be easily replaced with a global | |
@@ -879,6 +878,10 b' class ui(object):' | |||||
879 | # default editor command similar treatment. |
|
878 | # default editor command similar treatment. | |
880 | envpager = encoding.environ.get('PAGER', 'more') |
|
879 | envpager = encoding.environ.get('PAGER', 'more') | |
881 | pagercmd = self.config('pager', 'pager', envpager) |
|
880 | pagercmd = self.config('pager', 'pager', envpager) | |
|
881 | if not pagercmd: | |||
|
882 | return | |||
|
883 | ||||
|
884 | self.debug('starting pager for command %r\n' % command) | |||
882 | self.pageractive = True |
|
885 | self.pageractive = True | |
883 | # Preserve the formatted-ness of the UI. This is important |
|
886 | # Preserve the formatted-ness of the UI. This is important | |
884 | # because we mess with stdout, which might confuse |
|
887 | # because we mess with stdout, which might confuse |
@@ -89,6 +89,12 b' Pager should not start if stdout is not ' | |||||
89 | $ hg log -l1 -q --config ui.formatted=False |
|
89 | $ hg log -l1 -q --config ui.formatted=False | |
90 | 10:46106edeeb38 |
|
90 | 10:46106edeeb38 | |
91 |
|
91 | |||
|
92 | Pager should be disabled if pager.pager is empty (otherwise the output would | |||
|
93 | be silently lost.) | |||
|
94 | ||||
|
95 | $ hg log -l1 -q --config pager.pager= | |||
|
96 | 10:46106edeeb38 | |||
|
97 | ||||
92 | Pager with color enabled allows colors to come through by default, |
|
98 | Pager with color enabled allows colors to come through by default, | |
93 | even though stdout is no longer a tty. |
|
99 | even though stdout is no longer a tty. | |
94 | $ cat >> $HGRCPATH <<EOF |
|
100 | $ cat >> $HGRCPATH <<EOF |
General Comments 0
You need to be logged in to leave comments.
Login now