Patchwork [2,of,5] ui: send traceback of devel warning to appropriate output stream

login
register
mail settings
Submitter Yuya Nishihara
Date Oct. 4, 2015, 6:08 a.m.
Message ID <e22e5ec34357049d2da1.1443938883@mimosa>
Download mbox | patch
Permalink /patch/10768/
State Accepted
Headers show

Comments

Yuya Nishihara - Oct. 4, 2015, 6:08 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1443881440 -32400
#      Sat Oct 03 23:10:40 2015 +0900
# Node ID e22e5ec34357049d2da1a718cbdb7414edd52ed1
# Parent  6567c8f93c6258de7101a4ebebfaf6239aa11d7c
ui: send traceback of devel warning to appropriate output stream

If ui.ferr is a command-server channel, traceback should be written to it.

Patch

diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -994,7 +994,7 @@  class ui(object):
         """issue a developer warning message"""
         msg = 'devel-warn: ' + msg
         if self.tracebackflag:
-            util.debugstacktrace(msg, 2)
+            util.debugstacktrace(msg, 2, self.ferr, self.fout)
         else:
             curframe = inspect.currentframe()
             calframe = inspect.getouterframes(curframe, 2)