comparison mercurial/ui.py @ 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 3f0744eeaeaf
children 7a5335ed7e1a
comparison
equal deleted inserted replaced
25362:20ad936ac5d2 25363:3ff4b07412ad
865 self.write_err('Traceback (most recent call last):\n', 865 self.write_err('Traceback (most recent call last):\n',
866 ''.join(exctb[:-1]), 866 ''.join(exctb[:-1]),
867 ''.join(causetb), 867 ''.join(causetb),
868 ''.join(exconly)) 868 ''.join(exconly))
869 else: 869 else:
870 self.flush() # flush debug or status message
870 traceback.print_exception(exc[0], exc[1], exc[2], 871 traceback.print_exception(exc[0], exc[1], exc[2],
871 file=self.ferr) 872 file=self.ferr)
872 return self.tracebackflag or force 873 return self.tracebackflag or force
873 874
874 def geteditor(self): 875 def geteditor(self):