[PATCH] color: use ui.formatted() to test TTYness, not sys.stdout.isatty()
Christian Ebert
blacktrash at gmx.net
Sun May 1 07:10:29 CDT 2011
* Christian Ebert on Sunday, May 01, 2011 at 12:28:53 +0100
> * 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.
Nah, tested with with a clean checkout from
http://selenic.com/hg, same problem.
Tested with:
$ xterm -version
X.Org 6.8.99.903(270)
and latest ncurses
and Terminal.app with Apple-shipped ncurses.
c
--
Was heißt hier Dogma, ich bin Underdogma!
[ What the hell do you mean dogma, I am underdogma. ]
free movies --->>> http://www.blacktrash.org/underdogma
http://itunes.apple.com/podcast/underdogma-movies/id363423596
More information about the Mercurial-devel
mailing list