[PATCH 1 of 2 py3] color: replace str() with pycompat.bytestr()
Pulkit Goyal
7895pulkit at gmail.com
Wed Mar 29 19:51:38 UTC 2017
# HG changeset patch
# User Pulkit Goyal <7895pulkit at gmail.com>
# Date 1490779072 -19800
# Wed Mar 29 14:47:52 2017 +0530
# Node ID 7339bf21508131c90a44317ff16214b81ebe62c1
# Parent 08aeba5bc7c623a700eea9011e0d904e3732134a
color: replace str() with pycompat.bytestr()
diff -r 08aeba5bc7c6 -r 7339bf215081 mercurial/color.py
--- a/mercurial/color.py Sun Mar 26 20:52:51 2017 +0530
+++ b/mercurial/color.py Wed Mar 29 14:47:52 2017 +0530
@@ -332,9 +332,10 @@
stop = _effect_str(ui, 'none')
else:
activeeffects = _activeeffects(ui)
- start = [str(activeeffects[e]) for e in ['none'] + effects.split()]
+ start = [pycompat.bytestr(activeeffects[e]) for e in ['none']
+ + effects.split()]
start = '\033[' + ';'.join(start) + 'm'
- stop = '\033[' + str(activeeffects['none']) + 'm'
+ stop = '\033[' + pycompat.bytestr(activeeffects['none']) + 'm'
return _mergeeffects(text, start, stop)
_ansieffectre = re.compile(br'\x1b\[[0-9;]*m')
More information about the Mercurial-devel
mailing list