Matt,<br><br>Will do.<br><br>Thanks,<br>Kevin Christen<br><br><div class="gmail_quote">On Dec 29, 2007 9:49 PM, Matt Mackall <<a href="mailto:mpm@selenic.com">mpm@selenic.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c"><br>On Sat, 2007-12-29 at 17:21 -0600, <a href="mailto:kevin.christen@gmail.com">kevin.christen@gmail.com</a> wrote:<br>> # HG changeset patch<br>> # User Kevin Christen <<a href="mailto:kevin.christen@gmail.com">
kevin.christen@gmail.com</a>><br>> # Date 1198945152 21600<br>> # Node ID 7ebe8ea4d38e57bb27821ef5bd389662f20196f3<br>> # Parent bc475d1f74caf65df21b267b5b9ab58770c3a903<br>> Color command output using ui buffers
<br>><br>> diff -r bc475d1f74ca -r 7ebe8ea4d38e hgext/color.py<br>> --- /dev/null Thu Jan 01 00:00:00 1970 +0000<br>> +++ b/hgext/color.py Sat Dec 29 10:19:12 2007 -0600<br>> @@ -0,0 +1,196 @@<br>> +# color.py
color output for the status and qseries commands<br>> +#<br>> +# Copyright (C) 2007 Kevin Christen <<a href="mailto:kevin.christen@gmail.com">kevin.christen@gmail.com</a>><br>> +#<br>> +# This program is free software: you can redistribute it and/or modify it
<br>> +# under the terms of the GNU General Public License as published by the<br>> +# Free Software Foundation, either version 3 of the License, or (at your<br>> +# option) any later version.<br>> +#<br>> +# This program is distributed in the hope that it will be useful, but
<br>> +# WITHOUT ANY WARRANTY; without even the implied warranty of<br>> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General<br>> +# Public License for more details.<br>> +#<br>> +# You should have received a copy of the GNU General Public License along
<br>> +# with this program. If not, see <<a href="http://www.gnu.org/licenses/" target="_blank">http://www.gnu.org/licenses/</a>>. This<br>> +# software may be used and distributed according to the terms of the GNU
<br>> +# General Public License, incorporated herein by reference.<br>> +<br>> +'''add color output to the status and qseries commands<br>> +<br>> +This extension provides the cstatus command, which adds color to the output
<br>> +of the status command to reflect file status, and the cqseries command,<br>> +which adds color to the output of the qseries command to reflect patch<br>> +status (applied, unapplied, missing). Other effects in addition to color
<br>> +are availble, like bold and underlined text. Effects are rendered with the<br>> +ECMA-48 SGR control function (aka ANSI escape codes). This module also<br>> +provides the render_text function, which can be used to add effects to any
<br>> +text.<br><br></div></div>You might as well go all the way and replace the status and series<br>commands in the main command table (after you've saved a private<br>pointer), rather than introducing new commands. You should also probably
<br>automatically disable color when the output is not to a tty.<br><font color="#888888"><br>--<br>Mathematics is the supreme nostalgia of our time.<br><br></font></blockquote></div><br>