changeset 25363:3ff4b07412ad

ui: flush stdout before writing traceback to stderr Sometimes a traceback message is paired with ui.debug(). This patch makes sure that these messages are displayed in the right order.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 31 May 2015 14:40:28 +0900
parents 20ad936ac5d2
children de23a552fc23
files mercurial/ui.py
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/ui.py	Wed May 27 10:44:04 2015 -0700
+++ b/mercurial/ui.py	Sun May 31 14:40:28 2015 +0900
@@ -867,6 +867,7 @@
                                ''.join(causetb),
                                ''.join(exconly))
             else:
+                self.flush()  # flush debug or status message
                 traceback.print_exception(exc[0], exc[1], exc[2],
                                           file=self.ferr)
         return self.tracebackflag or force