Mercurial - command line colors (color extension) not working on Windows 7

With Mercurial, there is a nice extension called color, which uses different colors on the command line, for diff and for log etc.

The hg color extension looks at the Environment variable TERM in order to try and determine what kind of terminal is in use.

On Windows 7, if the environment variable TERM is set, then this can cause a problem, where the hg color extension will not work.

This only occurred on 1 of 3 different Windows 7 machines I use.


According to the Color extension documentation,
adding the following to your %USERPROFILE%\mercurial.ini file should solve the problem (did not work for me):


[color]
mode = win32



A workaround, is to unset the TERM environment variable.

To do this on the command line:


set TERM=

then the hg color extension should work ok :)

Comments

Post a Comment