Code review comment for lp:~lovesyao/bzr/windows-utf8

Revision history for this message
Parth Malwankar (parthm) wrote :

>
> Supporting colors would be interesting but keying off reserved unicode
> characters to do it is a bit weird.

It would be good to have bzrlib support color on windows and unix.
As this feature is not present, plugins end up with their own support. E.g. lp:bzrtools[1] and lp:bzr-grep[2] have their own implementation of color (unix only). I know there is a PyPI package (colorama[3] if I remember the code correctly) that supports color on both windows and unix. On Windows, from the developer/user perspective it translates the standard unix escape sequence into the appropriate windows equivalent. Maybe we can just use colorama or use a similar approach. Having bzrlib color support will also allow other commands to log etc. to have color.

Hmm. Maybe this should be a separate wishlist bug.

[1] http://bazaar.launchpad.net/~abentley/bzrtools/bzrtools.dev/annotate/head:/terminal.py
[2] http://bazaar.launchpad.net/~bzr/bzr-grep/trunk/annotate/head:/termcolor.py
[3] http://pypi.python.org/pypi/colorama/0.1.14

« Back to merge proposal