Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mercurial color extension in Windows Powershell

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
like image 529
derekerdmann Avatar asked Oct 21 '10 03:10

derekerdmann


1 Answers

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
like image 52
Jaykul Avatar answered Sep 20 '22 15:09

Jaykul