Patchwork [5,of,5] blackbox: trap warnings

login
register
mail settings
Submitter timeless@mozdev.org
Date March 11, 2016, 5:43 p.m.
Message ID <526299cd2c430aed8879.1457718237@waste.org>
Download mbox | patch
Permalink /patch/13804/
State Superseded
Headers show

Comments

timeless@mozdev.org - March 11, 2016, 5:43 p.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1455219585 0
#      Thu Feb 11 19:39:45 2016 +0000
# Node ID 526299cd2c430aed88799ab28b25dcda8d22290b
# Parent  1a7bc043788ab7933dc46b6c9780a9dde0eed455
blackbox: trap warnings

Patch

diff --git a/hgext/blackbox.py b/hgext/blackbox.py
--- a/hgext/blackbox.py
+++ b/hgext/blackbox.py
@@ -189,6 +189,11 @@ 
                 if not lastui or ui._bbrepo:
                     lastui = ui
 
+        def warn(self, *msg, **opts):
+            super(blackboxui, self).warn(*msg, **opts)
+            output = ''.join(msg)
+            self.log("blackboxwarn", "%s\n", output)
+
         def setrepo(self, repo):
             self._bbfp = None
             self._bbrepo = repo