diff mercurial/util.py @ 31314:7c877cbf30d6

util: strip trailing newline from debugstacktrace message This makes the function more convenient to use as drop-in replacement for ui.write & co.
author Mads Kiilerich <madski@unity3d.com>
date Fri, 16 Jan 2015 04:26:40 +0100
parents b4cd912d7704
children 78ac7061f840
line wrap: on
line diff
--- a/mercurial/util.py	Fri Jan 16 04:26:40 2015 +0100
+++ b/mercurial/util.py	Fri Jan 16 04:26:40 2015 +0100
@@ -2871,7 +2871,7 @@
     '''
     if otherf:
         otherf.flush()
-    f.write('%s at:\n' % msg)
+    f.write('%s at:\n' % msg.rstrip())
     for line in getstackframes(skip + 1):
         f.write(line)
     f.flush()