diff mercurial/ui.py @ 28498:d09be0b8a3c6

ui: log devel warnings
author timeless <timeless@mozdev.org>
date Fri, 29 Jan 2016 14:37:16 +0000
parents 41dcd7545266
children 71e12fc53b80
line wrap: on
line diff
--- a/mercurial/ui.py	Fri Mar 11 17:22:04 2016 +0000
+++ b/mercurial/ui.py	Fri Jan 29 14:37:16 2016 +0000
@@ -1069,11 +1069,15 @@
         stacklevel += 1 # get in develwarn
         if self.tracebackflag:
             util.debugstacktrace(msg, stacklevel, self.ferr, self.fout)
+            self.log('develwarn', '%s at:\n%s' %
+                     (msg, ''.join(util.getstackframes(stacklevel))))
         else:
             curframe = inspect.currentframe()
             calframe = inspect.getouterframes(curframe, 2)
             self.write_err('%s at: %s:%s (%s)\n'
                            % ((msg,) + calframe[stacklevel][1:4]))
+            self.log('develwarn', '%s at: %s:%s (%s)\n',
+                     msg, *calframe[stacklevel][1:4])
 
     def deprecwarn(self, msg, version):
         """issue a deprecation warning