Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/mercurial/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mercurial 如何为windows控制台编码颜色_Mercurial - Fatal编程技术网

Mercurial 如何为windows控制台编码颜色

Mercurial 如何为windows控制台编码颜色,mercurial,Mercurial,我尝试为我的mercurial(版本2.4.2+20130203)日志设置一个模板。尝试了以下模板: lg = glog --template "\033[31m({rev}) {node|short}\033[0m \x1b[35m [{branch}] \033[1;34m<{author|person}>\033[0m \033[32m({date|age})\033[0m \n\t\t{desc}\n\033[0m" 当我将color.mode更改为win32hg sta

我尝试为我的mercurial(版本2.4.2+20130203)日志设置一个模板。尝试了以下模板:

lg = glog --template "\033[31m({rev})  {node|short}\033[0m \x1b[35m [{branch}] \033[1;34m<{author|person}>\033[0m \033[32m({date|age})\033[0m \n\t\t{desc}\n\033[0m"
当我将
color.mode
更改为
win32
hg status
时,效果很好,但是
hg lg
显示的树没有任何颜色(也没有
←[0;
mess)

另一件奇怪的事情是,当我通过
ui.logtemplate
使用与默认模板相同的模板时,它被渲染为混乱,而
hg lg
渲染颜色

还尝试将TERM设置为空字符串--没有结果

如何为
win32
颜色模式指定颜色


谢谢。

我将模式设置为
win32
,并且在命令行和别名上,以上所有操作都很好。将模式设置为ansi会把一切都搞糟,但我没有ansi驱动程序。查看
颜色扩展的源代码可以看出,在win32模式下,它试图将ansi代码转换为一系列属性并使用应用它们。您使用的是什么版本的windows?我现在使用的是标准WinXP-还没有在我的另一个框(Vista)上尝试过。谢谢,我使用的是windows 8:)
←[0;35;1;4m? patch.patch←[0m