comparison mercurial/ui.py @ 33762:86aca74a063b

merge with stable
author Augie Fackler <augie@google.com>
date Thu, 10 Aug 2017 14:23:41 -0400
parents d880a6bcef2f c2c6a0f7408b
children 7d5bc0e5b88f
comparison
equal deleted inserted replaced
33761:e6d8ee3c9ec3 33762:86aca74a063b
943 Args: 943 Args:
944 command: The full, non-aliased name of the command. That is, "log" 944 command: The full, non-aliased name of the command. That is, "log"
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,
953 # formatted() will need some adjustment. 959 # formatted() will need some adjustment.
954 or not self.formatted() 960 or not self.formatted()
1207 pass 1213 pass
1208 1214
1209 # call write() so output goes through subclassed implementation 1215 # call write() so output goes through subclassed implementation
1210 # e.g. color extension on Windows 1216 # e.g. color extension on Windows
1211 self.write(prompt, prompt=True) 1217 self.write(prompt, prompt=True)
1218 self.flush()
1212 1219
1213 # instead of trying to emulate raw_input, swap (self.fin, 1220 # instead of trying to emulate raw_input, swap (self.fin,
1214 # self.fout) with (sys.stdin, sys.stdout) 1221 # self.fout) with (sys.stdin, sys.stdout)
1215 oldin = sys.stdin 1222 oldin = sys.stdin
1216 oldout = sys.stdout 1223 oldout = sys.stdout