changeset 36502 | faaabe0dc4d1 |
parent 35351 | a4478f74ad56 |
child 37084 | f0b6fbea00cf |
--- a/mercurial/color.py Thu Mar 01 08:19:47 2018 -0500 +++ b/mercurial/color.py Thu Mar 01 08:38:39 2018 -0500 @@ -371,7 +371,7 @@ """add color control code according to the mode""" if ui._colormode == 'debug': if label and msg: - if msg[-1] == '\n': + if msg.endswith('\n'): msg = "[%s|%s]\n" % (label, msg[:-1]) else: msg = "[%s|%s]" % (label, msg)