mercurial/ui.py
changeset 28498 d09be0b8a3c6
parent 28218 41dcd7545266
child 28542 71e12fc53b80
--- 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