[PATCH] color: enabled color support for export command (issue1507)
gilles.moris at free.fr
Sun Sep 2 01:56:38 CDT 2012
On Thursday 30 August 2012 11:25:15 pm Matt Mackall wrote:
> > 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.
> I guess this is ok. Historically, 'hg export' exists to work with
> 'patch' or 'hg import', being pretty is not a goal. But I guess I
> occasionally use 'hg export' to look at patches rather than 'hg log
I don't like that. Normally "color" is shut down for non tty output.
But this increase the risk that export creates a non usable export patch if
this detection fails for some reasons.
We have "hg log -pvr" that does the job for coloring output, and "hg export"
should be just for exports. I don't see the point of risking to break scripts
when we already have a solution.
May be just a note in the help of export pointing to "hg log -pvr", though
referring to an extension from the core does not seem a good idea as well.
More information about the Mercurial-devel