Mercurial > hg
changeset 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 | 80752c655320 |
children | 78ac7061f840 |
files | mercurial/util.py tests/test-debugcommands.t |
diffstat | 2 files changed, 2 insertions(+), 3 deletions(-) [+] |
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()
--- 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 ...