comparison mercurial/ui.py @ 26451:c8f42c1926a5

ui: send traceback of devel warning to appropriate output stream If ui.ferr is a command-server channel, traceback should be written to it.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 03 Oct 2015 23:10:40 +0900
parents 60558319ce72
children 56b2bcea2529
comparison
equal deleted inserted replaced
26450:1138e1d05207 26451:c8f42c1926a5
992 992
993 def develwarn(self, msg): 993 def develwarn(self, msg):
994 """issue a developer warning message""" 994 """issue a developer warning message"""
995 msg = 'devel-warn: ' + msg 995 msg = 'devel-warn: ' + msg
996 if self.tracebackflag: 996 if self.tracebackflag:
997 util.debugstacktrace(msg, 2) 997 util.debugstacktrace(msg, 2, self.ferr, self.fout)
998 else: 998 else:
999 curframe = inspect.currentframe() 999 curframe = inspect.currentframe()
1000 calframe = inspect.getouterframes(curframe, 2) 1000 calframe = inspect.getouterframes(curframe, 2)
1001 self.write_err('%s at: %s:%s (%s)\n' % ((msg,) + calframe[2][1:4])) 1001 self.write_err('%s at: %s:%s (%s)\n' % ((msg,) + calframe[2][1:4]))
1002 1002