【发布时间】:2011-01-28 02:29:11
【问题描述】:
我无法让 Mercurial 识别我的编辑器。我有一个文件 c:\windows\notepad.exe 并在命令提示符下键入“记事本”。我可以通过使用“-m”参数来提供提交标题来提交。但是一个简单的“hg commit”就会出现错误。
调用“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
我尝试设置 HGEDITOR 环境变量,在Mercurial.ini 文件中设置“visual =”和“editor =”。我只尝试了完整路径和命令。我还尝试将 notepad.exe 文件复制到当前文件夹和 mercurial 文件夹中。
理想情况下,我想在“C:\PortableApps\Notepad++Portable\Notepad++Portable.exe”这个位置使用编辑器,但在这个阶段我对任何编辑器都很满意!
HG 调试配置输出:
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"
【问题讨论】:
-
你在使用win7 64bit吗?我遇到了类似的问题,并在bitbucket.org/tortoisehg/stable/issue/1361/… 开始了报告
-
我似乎通过重新安装操作系统解决了我的问题。极端措施...
-
我猜这迟早会发生!不过还是很烦。但是为什么它不能只执行我给它的可执行文件呢?
标签: configuration mercurial editor notepad++