Mercurial > hg
comparison mercurial/ui.py @ 31490:8122cc5cb543
pager: flush outputs before firing pager process
So that buffered outputs are always sent to the console.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 25 Feb 2017 17:29:30 +0900 |
parents | a7c687c35119 |
children | 713e984bec91 |
comparison
equal
deleted
inserted
replaced
31489:5b2e1689b24d | 31490:8122cc5cb543 |
---|---|
843 pagercmd = self.config('pager', 'pager', envpager) | 843 pagercmd = self.config('pager', 'pager', envpager) |
844 if not pagercmd: | 844 if not pagercmd: |
845 return | 845 return |
846 | 846 |
847 self.debug('starting pager for command %r\n' % command) | 847 self.debug('starting pager for command %r\n' % command) |
848 self.flush() | |
848 self.pageractive = True | 849 self.pageractive = True |
849 # Preserve the formatted-ness of the UI. This is important | 850 # Preserve the formatted-ness of the UI. This is important |
850 # because we mess with stdout, which might confuse | 851 # because we mess with stdout, which might confuse |
851 # auto-detection of things being formatted. | 852 # auto-detection of things being formatted. |
852 self.setconfig('ui', 'formatted', self.formatted(), 'pager') | 853 self.setconfig('ui', 'formatted', self.formatted(), 'pager') |