# HG changeset patch # User Valentin Gatien-Baron # Date 2018-08-26 17:09:35 # Node ID 6f38284b23f426b55d9375919f63ab4bd0fa81c0 # Parent 9198e41df6efc6264b226d4d6299a24e40d9a603 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 diff --git a/mercurial/ui.py b/mercurial/ui.py --- a/mercurial/ui.py +++ b/mercurial/ui.py @@ -1052,6 +1052,7 @@ class ui(object): 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()