[PATCH] color: use ui.formatted() to test TTYness, not sys.stdout.isatty()

Christian Ebert blacktrash at gmx.net
Sun May 1 06:28:53 CDT 2011


* Brodie Rao on Sunday, May 01, 2011 at 12:14:24 +0200
> # HG changeset patch
> # User Brodie Rao <brodie at bitheap.org>
> # Date 1304244862 -7200
> # Node ID de9e9fed0d5ed6eb6f35ad7f387e3c447b4e22e8
> # Parent  3e9e02a41dfb0a85ec0968681e416d579ee875db
> color: use ui.formatted() to test TTYness, not sys.stdout.isatty()
> 
> This fixes the color extension not working with pager (broken in
> 877390020477). The pager extension already sets ui.formatted=True to
> allow this use case.

I still get control chars, unless I set color.mode = anssi:

^Odiff --git a/hgext/color.py b/hgext/color.py^O
^O--- a/hgext/color.py^O
^O+++ b/hgext/color.py^O
[...]

Perhaps I missed an interim patch, it does not apply cleanly to
crew which I use for testing.

c
-- 
theatre - books - texts - movies
Black Trash Productions at home: http://www.blacktrash.org
Black Trash Productions on Facebook:
http://www.facebook.com/blacktrashproductions


More information about the Mercurial-devel mailing list