views:

75

answers:

2

Is there a way to enable color support for Mercurial in Powershell on Windows 7? The ColorExtension page says to add

[color]
mode = win32

to your .hgrc file, but it doesn't seem to make a difference.

Running hg status shows several files that have not yet been added to the repository, and I believe they should have a pink color (based off other terminals I've seen). This is what's displayed instead:

←[0;35;1;4m? samplefile.php←[0m
←[0;35;1;4m? anotherfile.php←[0m
←[0;35;1;4m? derpderp.xml←[0m
←[0;35;1;4m? derp_model.php←[0m
←[0;35;1;4m? stillnocolor.php←[0m
+1  A: 

Did you also make sure to enable the ColorExtension? You need this in your .hgrc too:

[extensions]
color =

If that's there too you can make sure your settings are being picked up with:

hg --debug showconfig
Ry4an
Yes, the extension is enabled. Settings show up just fine, so I'm not sure why they aren't being displayed.
derekerdmann
+2  A: 

You probably need to update to the latest mercurial (1.6.4). Version 1.5.4 in particular didn't do win32 color properly (and there have been quite a few color-related and win32-related bugs fixed in recent builds).

You also need to make sure you're not specifying ANSI color mode. You can force win32:

[color]
mode = win32
Jaykul
Nice catch, I hadn't realized I was running an older version.
derekerdmann