util: strip trailing newline from debugstacktrace message
This makes the function more convenient to use as drop-in replacement for
ui.write & co.
--- 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()
--- a/tests/test-debugcommands.t Fri Jan 16 04:26:40 2015 +0100
+++ b/tests/test-debugcommands.t Fri Jan 16 04:26:40 2015 +0100
@@ -129,8 +129,7 @@
stacktrace at:
debugstacktrace.py:10 in * (glob)
debugstacktrace.py:3 in f
- hello from g
- at:
+ hello from g at:
debugstacktrace.py:10 in * (glob)
debugstacktrace.py:4 in f
hi ...