comparison 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
comparison
equal deleted inserted replaced
31313:80752c655320 31314:7c877cbf30d6
2869 It can be used everywhere and intentionally does not require an ui object. 2869 It can be used everywhere and intentionally does not require an ui object.
2870 Not be used in production code but very convenient while developing. 2870 Not be used in production code but very convenient while developing.
2871 ''' 2871 '''
2872 if otherf: 2872 if otherf:
2873 otherf.flush() 2873 otherf.flush()
2874 f.write('%s at:\n' % msg) 2874 f.write('%s at:\n' % msg.rstrip())
2875 for line in getstackframes(skip + 1): 2875 for line in getstackframes(skip + 1):
2876 f.write(line) 2876 f.write(line)
2877 f.flush() 2877 f.flush()
2878 2878
2879 class dirs(object): 2879 class dirs(object):