Mercurial Eclipse 错误
我正在尝试在 Eclipse 中使用 Mercurial。我为此下载了 Mercurial Eclipse 插件。
但是,尽管我重新安装了很多次,但还是出现同样的错误,我将屏幕截图放在下面。
Checking encoding (cp1254)...
Checking extensions...
Checking templates...
Checking patch...
Checking commit editor...
Can't find editor 'notepad' in PATH
(specify a commit editor in your configuration file)
Checking username...
1 problems detected, please check your install!. Command line: hg -y debuginstall
我不知道如何处理这个问题。任何帮助将非常感激,谢谢。
I am trying to use mercurial in eclipse. I downloaded mercurial eclipse plugin for this.
But, despite I had reinstalled it many times, it gives the same error, I put the screenshot below.
Checking encoding (cp1254)...
Checking extensions...
Checking templates...
Checking patch...
Checking commit editor...
Can't find editor 'notepad' in PATH
(specify a commit editor in your configuration file)
Checking username...
1 problems detected, please check your install!. Command line: hg -y debuginstall
I do not know how to handle this. Any help will be appreciated very much, thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
当我尝试在 Win 7 x64 上运行 Eclipse x64 时,遇到了同样的问题。 MercurialEclipse 似乎无法访问 C:\windows\system32\ 文件夹,尽管它已在系统路径中指定。
您需要在 Mercurial.ini 文件中指定编辑器的位置。此文件位于
c:\Users\\mercurial.ini
。在
username = ...
行下,添加一行以指定编辑器(请参见下文)。请记住不要在路径周围加上引号。I encountered the same problem when I tried to run Eclipse x64 on Win 7 x64. The MercurialEclipse seems not able to access C:\windows\system32\ folder, although it has been specified in system PATH.
You need to specify the location of editor in the Mercurial.ini file. This file is located at
c:\Users\<your_username>\mercurial.ini
.Under the
username = ...
line, add a line to specify the editor (see following). Remember not to put quotes around the path.(注意:类似于 Mercurial Eclipse 项目中的 bug 13505)
Eclipse 继承了当前的路径会议。
打开 DOS 会话,并检查该会话的路径中是否有
notepad
(它应该考虑到记事本位于C:\Windows\system32\notepad.exe
中)。确保 C:\Windows\system32(或%SystemRoot%\system32
)位于PATH
中的第一个位置(以防其他带有空格或特殊路径的路径产生副作用)其中的字符)。如果路径正确,则从该命令行 DOS 窗口启动 eclipse,并查看问题是否仍然存在。
OP emre 报告其
%PATH%
为:换句话说,没有
% SystemRoot%\system32
。您需要编辑
环境变量<中的
系统变量
/code> Windows 设置,并在
PATH
变量中添加:然后您可以打开一个新的 DOS 会话,从那里启动 eclipse,这样应该可以正常工作。
(Note: similar to bug 13505 in Mercurial Eclipse project)
The Eclipse inherits the path from your current session.
Open a DOS session, and check if said session does have
notepad
in its path (which it should considering notepad is inC:\Windows\system32\notepad.exe
). Make sure C:\Windows\system32 (or%SystemRoot%\system32
) is in first position in yourPATH
(in case of side effect with other paths with spaces or special characters in it).If the path is correct, then launch the eclipse from that command-line DOS windows, and see if the problem persists.
The OP emre reports its
%PATH%
being:In other word, no
%SystemRoot%\system32
.You need to edit the
System variables
in theEnvironment variable
settings of Windows, and add in the first place in thePATH
variable:Then you can open a new DOS session, launch eclipse from there and ot should work fine.
我遇到了同样的问题并搜索了几个小时,直到我尝试转义编辑器路径中的反斜杠。
所以我像这样编辑了mercurial.ini(在我的win7上):
并且它起作用了。
i had the same problem and searched for hours till i tried to escape the backslash in the path for the editor.
so i edited the mercurial.ini (on my win7) like this:
and it worked.
三个补充:
设置为 [tortoisehg] 部分而不是 [ui] 部分
Mercurial.ini 要使 Eclipse Mercurial 正常工作,编辑器路径也必须位于
[ui] 部分。不然eclipse会出现这个错误。
系统路径),但仍然出现上述错误。在我手中
上面给出的一般系统路径建议似乎偏离目标
Three additions:
setting to [tortoisehg] section rather than the [ui] section of
mercurial.ini For Eclipse Mercurial to work, the editor path must also be in
the [ui] section. Otherwise, eclipse will have this error.
system path) and yet the error above still occurs. In my hands the
general system path advice given above seems off target
另一件需要注意的事情是 HGEDITOR 环境变量,它会覆盖 Mercurial.ini 中的编辑器设置。我将 HGEDITOR 设置为 C:\Windows\System32\notepad.exe,但这不起作用(由于未转义的反斜杠),并且我对 Mercurial.ini 的所有更改都被忽略。将 HGEDITOR 更改为 C:\\Windows\\System32\\notepad.exe 最终摆脱了 Mercurial Eclipse 错误。
One other thing to look at is the HGEDITOR environment variable, which overrides the editor setting in mercurial.ini. I had HGEDITOR set to C:\Windows\System32\notepad.exe, which didn't work (due to the unescaped backslashes), and all my changes to mercurial.ini were ignored. Changing HGEDITOR to C:\\Windows\\System32\\notepad.exe finally got rid of the Mercurial Eclipse errors.