Issue1579

Title [PATCH] The color extension does not work on Windows
Priority bug Status resolved
Superseder Nosy List brodie, jeberger, sborho, tonfa
Assigned To sborho Topics windows

Created on 2009-03-28.18:07:30 by jeberger, last changed 2011-02-13.05:37:08 by brodie.

Files
File name Uploaded Type Edit Remove
updated-patch.txt sborho, 2010-03-09.19:43:25 text/plain
win32-color.patch jeberger, 2009-03-28.18:07:29 application/octet-stream
Messages
msg15221 (view) Author: brodie Date: 2011-02-13.05:37:08
I'm marking this as resolved. The 1.6 added native support for colorization on 
Windows (thanks to sborho).
msg12011 (view) Author: sborho Date: 2010-03-11.05:33:05
I've created a wincolor extension that performs this same hack at a lower
level.  It swaps out sys.stdout for an ANSI aware pyreadline console as soon
as wincolor is loaded into the hg process.

http://bitbucket.org/sborho/wincolor

Recent TortoiseHg nightly builds include pyreadline and wincolor, so the
color extension works right away if you enable wincolor as well, as in:

[extensions]
color =
wincolor =

It's an open topic for future optimization to combine wincolor into the
color extension, when wincolor is considered stable.
msg11989 (view) Author: sborho Date: 2010-03-09.19:43:25
This update patch works with hg-1.5 on Windows cmd.exe

Still requires pyreadline to be installed
msg10624 (view) Author: tonfa Date: 2009-10-03.15:37:08
[sorry to be so late on that]

Maybe a less intrusive solution would be to replace sys.stdout directly in 
the color extension.
msg8925 (view) Author: jeberger Date: 2009-03-28.18:07:29
The attached patch allows the color extension to work on windows provided that
PyReadlines [1] is installed.

[1] http://ipython.scipy.org/moin/PyReadline/Intro
History
Date User Action Args
2011-02-13 05:37:08brodiesetstatus: done-cbb -> resolved
assignedto: sborho
messages: + msg15221
nosy: tonfa, sborho, jeberger, brodie
2010-03-11 05:33:05sborhosetstatus: chatting -> done-cbb
nosy: tonfa, sborho, jeberger, brodie
messages: + msg12011
2010-03-09 19:43:25sborhosetfiles: + updated-patch.txt
nosy: + sborho
messages: + msg11989
2010-03-09 18:58:05brodiesetnosy: + brodie
2009-10-03 15:37:08tonfasettopic: + windows
status: unread -> chatting
messages: + msg10624
nosy: + tonfa
2009-03-28 18:07:30jebergercreate