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

Yuya Nishihara yuya at tcha.org
Sun Oct 4 01:08:03 CDT 2015


# HG changeset patch
# User Yuya Nishihara <yuya at 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.

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)


More information about the Mercurial-devel mailing list