There are the following lines in my .hgrc: [extensions] color = [color] diff.diffline = bold diff.extended = cyan bold diff.file_a = red bold diff.file_b = green bold diff.hunk = magenta diff.deleted = red diff.inserted = green diff.changed = white diff.trailingwhitespace = bold red_background "hg diff" is colorized then, but the documentation of the color extension says: This extension modifies the status command to add color to its output to reflect file status, the qseries command to add color to reflect patch status (applied, unapplied, missing), and to diff-related commands to highlight additions, removals, diff headers, and trailing whitespace. "hg export tip" is not colorized, even though it is a diff related command. $ hg --version Mercurial Distributed SCM (version 1.1.2) Copyright (C) 2005-2008 Matt Mackall <mpm@selenic.com> and others This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--- Bug imported by bugzilla@serpentine.com 2012-05-12 08:57 EDT --- This bug was previously known as _bug_ 1507 at http://mercurial.selenic.com/bts/issue1507 Bug Status was UNCONFIRMED but everconfirmed was true Setting status to CONFIRMED
Fixed by http://selenic.com/repo/hg/rev/a306837f8c87 Ankur Dahiya <ankurd@fb.com> color: enabled color support for export command (issue1507) The export command didn't output the diffs in color, even when color support was enabled. This patch fixes that by making the export command use the default ui.write method, instead of directly manipulating the ui.fout file object. Also added a test case to verify color output to test-export.t. (please test the fix)