diff mercurial/ui.py @ 34021:31a2eb0f74e5

pager: do not start pager if `ui` has been `pushbuffer`-ed The `pushbuffer`, `popbuffer` APIs are intended to capture internal output. They will prevent `ui.write` from writing to the actual `ui.fout`. So a pager won't receive the output and do the right thing. In general, it does not make sense to start a pager if ui is in the "pushbuffer" mode. Differential Revision: https://phab.mercurial-scm.org/D574
author Jun Wu <quark@fb.com>
date Wed, 30 Aug 2017 14:04:55 -0700
parents af20468eb0a4
children 6e6452bc441d
line wrap: on
line diff
--- a/mercurial/ui.py	Wed Aug 30 16:05:12 2017 -0700
+++ b/mercurial/ui.py	Wed Aug 30 14:04:55 2017 -0700
@@ -962,6 +962,7 @@
             # formatted() will need some adjustment.
             or not self.formatted()
             or self.plain()
+            or self._buffers
             # TODO: expose debugger-enabled on the UI object
             or '--debugger' in pycompat.sysargv):
             # We only want to paginate if the ui appears to be