Mercurial Editor:“abort:The system can not find the file specified” [英] Mercurial Editor: "abort: The system cannot find the file specified"

查看:420
本文介绍了Mercurial Editor:“abort:The system can not find the file specified”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题让Mercurial识别我的编辑器。我有一个文件, c:\windows \\\
otepad.exe
并在命令提示符处键入notepad工作。我可以通过使用 -m 参数来提交提交标题。但是一个简单的 hg commit 会出现错误。

I have a problem getting Mercurial to recognise my editor. I have a file, c:\windows\notepad.exe and typing "notepad" at the command prompt works. I can commit by using the "-m" argument to supply the commit title. But a simple "hg commit" brings up the error.

调用 hg --traceback commit 启动:

Traceback (most recent call last):
  File "mercurial\dispatch.pyc", line 47, in _runcatch
  File "mercurial\dispatch.pyc", line 466, in _dispatch
  File "mercurial\dispatch.pyc", line 336, in runcommand
  File "mercurial\dispatch.pyc", line 517, in _runcommand
  File "mercurial\dispatch.pyc", line 471, in checkargs
  File "mercurial\dispatch.pyc", line 465, in <lambda>
  File "mercurial\util.pyc", line 401, in check
  File "mercurial\commands.pyc", line 708, in commit
  File "mercurial\cmdutil.pyc", line 1150, in commit
  File "mercurial\commands.pyc", line 706, in commitfunc
  File "mercurial\localrepo.pyc", line 836, in commit
  File "mercurial\cmdutil.pyc", line 1155, in commiteditor
  File "mercurial\cmdutil.pyc", line 1184, in commitforceeditor
  File "mercurial\ui.pyc", line 361, in edit
  File "mercurial\util.pyc", line 383, in system
  File "subprocess.pyc", line 470, in call
  File "subprocess.pyc", line 621, in __init__
  File "subprocess.pyc", line 830, in _execute_child
WindowsError: [Error 2] The system cannot find the file specified
abort: The system cannot find the file specified

code> Mercurial.ini 文件中的code>和 editor = 我试过完全路径以及命令只。我也尝试将notepad.exe文件复制到当前文件夹以及mercurial文件夹。

I've tried setting the HGEDITOR environment variable, setting "visual =" and "editor =" in the Mercurial.ini file. I tried full path as well as command only. I also tried copying the notepad.exe file into both the current folder as well as the mercurial folder.

理想情况下,我想使用编辑器在此位置 C:\ PortableApps\Notepad ++ Portable \Notepad ++ Portable.exe ,但在这个阶段我会很高兴与任何编辑器!

Ideally I would like to use the editor at this location "C:\PortableApps\Notepad++Portable\Notepad++Portable.exe", but at this stage I would be happy with any editor!

HG debugconfig输出:

HG debugconfig output:

c:\wamp\www\SiteAB.com\web>hg debugconfig
bundle.mainreporoot=c:\wamp\www\SiteAB.com\web
ui.username=killroy
ui.shell=true
ui.verbose=true
ui.visual="C:\PortableApps\Notepad++Portable\Notepad++Portable.exe"
ui.editor="C:\PortableApps\Notepad++Portable\Notepad++Portable.exe"


推荐答案

editor = notepad 没有工作表明您的环境有问题。因为从命令行运行记事本工作,我想知道是否可能的问题是与您的python安装。你的回溯使我认为你正在运行hg 1.5,这是当前你发布。虽然我不相信它应该有所作为,它不会伤害更新到1.5.4。

That editor = notepad didn't work suggests something is wrong with your environment. Since running notepad from the command line works, I wonder if maybe the problem is with your python installation. Your backtrace makes me think you're running hg 1.5 which was current when you posted. While I don't believe it should make a difference, it couldn't hurt to update to 1.5.4.

您正在从C:驱动器运行Notepad ++ Portable。通常,将PortableApps安装到可移动驱动器。你确定hg应该看看C:?我理解有时它可以方便无人管理的用户在本地安装。记事本++便携式将不会玩特别好与hg。你需要让npp完全关闭,并从hg或提交生成它不会工作。如果可以,我会尝试运行完整版的记事本++ 。这里是我使用:

You're running Notepad++Portable from your C: drive. Usually one installs PortableApps to a removable drive. Are you sure hg should look at C:? I understand sometimes it can be handy for unpriviledged users to install them locally. Notepad++Portable won't play particularly nice with hg. You'll need to have npp completely closed and spawn it from hg or commits won't work. If you can, I'd try running the full version of Notepad++ instead. Here's what I use:

[ui]
editor = "C:\Program Files\Notepad++\notepad++.exe" -multiInst -nosession

-multiInst 告诉npp为hg打开一个新的实例。这样,它不会干扰任何已经打开的npp窗口。这不适用于PortableApps版本。

-nosession 告诉npp不要打开您以前打开的任何文件,加快启动时间并减少杂乱。当我写一个提交消息时,我想关注我的消息,不要被一堆不相关的标签分心。

-multiInst tells npp to open a new instance just for hg. That way it won't interfere with any npp windows you already have open. This does not work with the PortableApps version.
-nosession tells npp not to open any files you previously had open, speeding startup times and reducing clutter. When I'm writing a commit message, I want to focus on my message, and not be distracted by a bunch of unrelated tabs.

这篇关于Mercurial Editor:“abort:The system can not find the file specified”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆