Mercurial Eclipse 错误

发布于 2024-10-17 09:42:48 字数 566 浏览 2 评论 0原文

我正在尝试在 Eclipse 中使用 Mercurial。我为此下载了 Mercurial Eclipse 插件。
但是,尽管我重新安装了很多次,但还是出现同样的错误,我将屏幕截图放在下面。

Mercurial for 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.

Mercurial for Eclipse error message

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

行至春深 2024-10-24 09:42:48

当我尝试在 Win 7 x64 上运行 Eclipse x64 时,遇到了同样的问题。 MercurialEclipse 似乎无法访问 C:\windows\system32\ 文件夹,尽管它已在系统路径中指定。
您需要在 Mercurial.ini 文件中指定编辑器的位置。此文件位于 c:\Users\\mercurial.ini

username = ... 行下,添加一行以指定编辑器(请参见下文)。请记住不要在路径周围加上引号。

[ui]
username = <username>
editor = c:\Windows\System32\notepad.exe

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.

[ui]
username = <username>
editor = c:\Windows\System32\notepad.exe
ゃ懵逼小萝莉 2024-10-24 09:42:48

(注意:类似于 Mercurial Eclipse 项目中的 bug 13505

Eclipse 继承了当前的路径会议。
打开 DOS 会话,并检查该会话的路径中是否有 notepad (它应该考虑到记事本位于 C:\Windows\system32\notepad.exe 中)。确保 C:\Windows\system32(或 %SystemRoot%\system32)位于 PATH 中的第一个位置(以防其他带有空格或特殊路径的路径产生副作用)其中的字符)。
如果路径正确,则从该命令行 DOS 窗口启动 eclipse,并查看问题是否仍然存在。


OP emre 报告其 %PATH% 为:

C:\Program Files\NVIDIA Corporation\PhysX\Common;
C:\Program Files\Java\jdk1.6.0_20\bin;
D:\eclipse-java-helios-sr1-win32\eclipse\android-2.2_r0-windows\android-2.2_r0-windows\tools;
C:\Program Files\Java\jdk1.6.0_20\bin

换句话说,没有 % SystemRoot%\system32

您需要编辑环境变量<中的系统变量 /code> Windows 设置,并在 PATH 变量中添加:

%SystemRoot%\system32

然后您可以打开一个新的 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 in C:\Windows\system32\notepad.exe). Make sure C:\Windows\system32 (or %SystemRoot%\system32) is in first position in your PATH (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:

C:\Program Files\NVIDIA Corporation\PhysX\Common;
C:\Program Files\Java\jdk1.6.0_20\bin;
D:\eclipse-java-helios-sr1-win32\eclipse\android-2.2_r0-windows\android-2.2_r0-windows\tools;
C:\Program Files\Java\jdk1.6.0_20\bin

In other word, no %SystemRoot%\system32.

You need to edit the System variables in the Environment variable settings of Windows, and add in the first place in the PATH variable:

%SystemRoot%\system32

Then you can open a new DOS session, launch eclipse from there and ot should work fine.

浮萍、无处依 2024-10-24 09:42:48

我遇到了同样的问题并搜索了几个小时,直到我尝试转义编辑器路径中的反斜杠
所以我像这样编辑了mercurial.ini(在我的win7上):

[ui]
username = <username>
editor = c:\\Windows\\System32\\notepad.exe

并且它起作用了。

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:

[ui]
username = <username>
editor = c:\\Windows\\System32\\notepad.exe

and it worked.

江心雾 2024-10-24 09:42:48

三个补充:

  • 看来Tortoise HG 3.3配置实用程序添加了我的编辑器
    设置为 [tortoisehg] 部分而不是 [ui] 部分
    Mercurial.ini 要使 Eclipse Mercurial 正常工作,编辑器路径也必须位于
    [ui] 部分。不然eclipse会出现这个错误。
  • 使用正斜杠适当地替换转义的反斜杠
  • 在 Windows 8.1 上,记事本可以轻松地从命令提示符启动(在
    系统路径),但仍然出现上述错误。在我手中
    上面给出的一般系统路径建议似乎偏离目标

Three additions:

  • It seems that Tortoise HG 3.3 configuration utility added my editor
    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.
  • using forward slash suitably substitutes for the escaped backslash
  • On Windows 8.1, notepad easily starts from the command prompt (on
    system path) and yet the error above still occurs. In my hands the
    general system path advice given above seems off target
痴者 2024-10-24 09:42:48

另一件需要注意的事情是 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文