[PATCH] color: add support for terminfo-based attributes and color

Matt Mackall mpm at selenic.com
Sat Mar 19 01:01:10 CDT 2011


On Fri, 2011-03-18 at 22:49 -0700, Brodie Rao wrote:
> On Mar 14, 2011, at 4:02 PM, Danek Duvall wrote:
> 
> > # HG changeset patch
> > # User Danek Duvall <duvall at comfychair.org>
> > # Date 1300143477 25200
> > # Node ID 136b5e89112caf2483cd31cfa107063904577aa4
> > # Parent  d943efb9701f088313de17f6c32cad22928b96c7
> > color: add support for terminfo-based attributes and color
> >
> > Using terminfo instead of hard-coding ECMA-48 control sequences  
> > provides a
> > greater assurance that the terminal codes are correct for the current
> > terminal type; not everything supports the ANSI escape codes.
> >
> > It also allows us to use a wider range of colors when a terminal  
> > emulator
> > supports it (such as 16- or 256-color xterm), and a few more non-color
> > attributes, such as the ever-popular blink.
> 
> Your revised patch looks good.
> 
> Does this affect the test suite at all?

Yeah, this breaks tests a lot. On my laptop, it changes lots of the
escape codes or gives a traceback with:

+      return curses.tigetstr(val)
+  _curses.error: must call (at least) setupterm() first

On the older RHEL box with Py2.4 that I do most of my tests on, I get
more serious breakage:

+      curses.setupterm()
+  _curses.error: setupterm: could not find terminfo database

Breaks something like 11 tests.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list