pager: flush outputs before firing pager process

So that buffered outputs are always sent to the console.
This commit is contained in:
Yuya Nishihara 2017-02-25 17:29:30 +09:00
parent 21edd5907a
commit 7701e518b5
2 changed files with 1 additions and 1 deletions

View File

@ -715,7 +715,6 @@ def email(ui, repo, *revs, **opts):
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:

View File

@ -845,6 +845,7 @@ class ui(object):
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