changeset 39313:6f38284b23f4

pager: do not enable when TERM=dumb Before this, running hg in emacs' M-x shell started `less`, which would complain about the terminal not being fully functional. Differential Revision: https://phab.mercurial-scm.org/D4376
author Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
date Sun, 26 Aug 2018 13:09:35 -0400
parents 9198e41df6ef
children 7f5e6d3e9032
files mercurial/ui.py
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/ui.py	Wed Aug 22 20:52:36 2018 +0900
+++ b/mercurial/ui.py	Sun Aug 26 13:09:35 2018 -0400
@@ -1052,6 +1052,7 @@
             command in self.configlist('pager', 'ignore')
             or not self.configbool('ui', 'paginate')
             or not self.configbool('pager', 'attend-' + command, True)
+            or encoding.environ.get('TERM') == 'dumb'
             # TODO: if we want to allow HGPLAINEXCEPT=pager,
             # formatted() will need some adjustment.
             or not self.formatted()