diff contrib/chg/util.h @ 28787:ea86cdcd9b50

chg: use color in debug/error messages conditionally Before this patch, chg always uses color in its debugmsg and abortmsg and there is no way to turn it off. This patch adds a global flag to control whether chg should use color or not and only enables it when stderr is a tty and HGPLAIN is not set.
author Jun Wu <quark@fb.com>
date Tue, 05 Apr 2016 14:48:09 +0100
parents d4d8a3c89e6d
children 57a78a64de44
line wrap: on
line diff
--- a/contrib/chg/util.h	Mon Apr 04 17:45:54 2016 -0700
+++ b/contrib/chg/util.h	Tue Apr 05 14:48:09 2016 +0100
@@ -18,6 +18,7 @@
 
 void abortmsg(const char *fmt, ...) PRINTF_FORMAT_;
 
+void enablecolor(void);
 void enabledebugmsg(void);
 void debugmsg(const char *fmt, ...) PRINTF_FORMAT_;