[PATCH 1 of 3] chg: use color in log conditionally

Yuya Nishihara yuya at tcha.org
Tue Apr 5 11:12:34 EDT 2016


On Tue, 5 Apr 2016 15:21:16 +0100, Jun Wu wrote:
> # HG changeset patch
> # User Jun Wu <quark at fb.com>
> # Date 1459864089 -3600
> #      Tue Apr 05 14:48:09 2016 +0100
> # Node ID 704d3febf4b7ea1063c2c3a58788de13fea31e79
> # Parent  97067764c768447c376d6614b3fdb30e498519c9
> chg: use color in log conditionally

Nice, queued this, thanks.

> +	if (!getenv("HGPLAIN") && isatty(STDERR_FILENO))

I've changed it to isatty(fileno(stderr)) for consistency with setuppager().


More information about the Mercurial-devel mailing list