pager: flush outputs before firing pager process
authorYuya Nishihara <yuya@tcha.org>
Sat, 25 Feb 2017 17:29:30 +0900
changeset 31497 8122cc5cb543
parent 31496 5b2e1689b24d
child 31498 492c64afc54c
pager: flush outputs before firing pager process So that buffered outputs are always sent to the console.
hgext/patchbomb.py
mercurial/ui.py
--- a/hgext/patchbomb.py	Sat Feb 25 17:27:48 2017 +0900
+++ b/hgext/patchbomb.py	Sat Feb 25 17:29:30 2017 +0900
@@ -715,7 +715,6 @@
             m['Reply-To'] = ', '.join(replyto)
         if opts.get('test'):
             ui.status(_('displaying '), subj, ' ...\n')
-            ui.flush()
             ui.pager('email')
             generator = emailmod.Generator.Generator(ui, mangle_from_=False)
             try:
--- a/mercurial/ui.py	Sat Feb 25 17:27:48 2017 +0900
+++ b/mercurial/ui.py	Sat Feb 25 17:29:30 2017 +0900
@@ -845,6 +845,7 @@
             return
 
         self.debug('starting pager for command %r\n' % command)
+        self.flush()
         self.pageractive = True
         # Preserve the formatted-ness of the UI. This is important
         # because we mess with stdout, which might confuse