[PATCH 00 of 13] ui: provide ui.write() labeling for simpler output styling/colorizing

Steve Borho steve at borho.org
Mon Apr 5 10:29:22 CDT 2010


On Fri, Apr 2, 2010 at 10:41 PM, Steve Borho <steve at borho.org> wrote:
> On Fri, Apr 2, 2010 at 2:33 PM, Brodie Rao <dackze at gmail.com> wrote:
>> ui.buffers has been renamed back to ui._buffers.
>
> TortoiseHg is ready for these changes to land in Mercurial.
>
> http://bitbucket.org/tortoisehg/stable/issue/1122
>
> If no-one objects, I'll push them to crew tomorrow, then start work on
> making hgext/color.py work natively on a win32 console.

I've created a new extension for colors on win32 consoles, based on
this work in hg-crew:

http://bitbucket.org/sborho/wincolor/src/tip/w32color.py

I started out by trying to add the win32 support to the existing color
extension, but that turned out to be difficult for the initial
development.  However now that it's complete, it could probably be
merged again without too much pain.

But a stronger case could be made for pulling all of this into core
and enabling color by default.  The _styles dictionary and
configstyles() should probably be moved to ui.py.  The extstyles()
functionality should move into extensions.py.  win32print and _effects
dict should go in win32.py, while the ANSI variants should move to
posix.py.

--
Steve Borho


More information about the Mercurial-devel mailing list