Mercurial > hg
changeset 36502:faaabe0dc4d1
py3: use bytes.endswith('\n') to strip off '\n' from debug color output
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 01 Mar 2018 08:38:39 -0500 |
parents | 169ac2bb3c9c |
children | 8b662717c53f |
files | mercurial/color.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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)