【发布时间】:2013-05-18 02:23:04
【问题描述】:
我在 Windows XP 上安装了 TortoiseHg。虽然我可以从命令行正常使用大多数hg 命令,但我不能使用hg commit(没有-m 选项),因为它无法启动我的编辑器。这就是发生的事情:
> hg commit
/c: /c: is a directory
abort: edit failed: notepad.exe exited with status 126
在 mercurial.ini 中,我将编辑器设置为: [用户界面] 编辑器 = notepad.exe
如果我自己在命令行中输入notepad.exe 甚至只是notepad,那么记事本就可以正常工作。将编辑器变量更改为其他变量(例如 foobar)确认 Mercurial 正在读取变量并尝试运行 foobar 并得到相同的结果 (foobar exited with status 126)。
我在使用 TortoiseHg GUI 的某些部分时也遇到了问题。单击时,“查看修订版”等上下文菜单选项不起作用。大概他们正在尝试启动编辑器但失败了。
这个问题在使用 Mercurial 大约 2 1/2 年的时间里一直存在,我已经尝试了所有我能想到的以另一种方式设置编辑器变量或将其设置到另一个程序的方法。当前使用 TortoiseHg 2.8 版(“与 Mercurial-2.6、Python-2.7.3、PyQt-4.9.6、Qt-4.8.4”)。
相关问题:
Using other editor with TortoiseHg
How do I specify a different editor for Mercurial on Windows?
Mercurial Editor: "abort: The system cannot find the file specified"
【问题讨论】:
标签: configuration mercurial editor tortoisehg