I have a problem getting Mercurial to recognise my editor. I have a file, c:windows
otepad.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.
A call to "hg --traceback commit
" brings up:
Traceback (most recent call last):
File "mercurialdispatch.pyc", line 47, in _runcatch
File "mercurialdispatch.pyc", line 466, in _dispatch
File "mercurialdispatch.pyc", line 336, in runcommand
File "mercurialdispatch.pyc", line 517, in _runcommand
File "mercurialdispatch.pyc", line 471, in checkargs
File "mercurialdispatch.pyc", line 465, in <lambda>
File "mercurialutil.pyc", line 401, in check
File "mercurialcommands.pyc", line 708, in commit
File "mercurialcmdutil.pyc", line 1150, in commit
File "mercurialcommands.pyc", line 706, in commitfunc
File "mercuriallocalrepo.pyc", line 836, in commit
File "mercurialcmdutil.pyc", line 1155, in commiteditor
File "mercurialcmdutil.pyc", line 1184, in commitforceeditor
File "mercurialui.pyc", line 361, in edit
File "mercurialutil.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
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.
Ideally I would like to use the editor at this location "C:PortableAppsNotepad++PortableNotepad++Portable.exe
", but at this stage I would be happy with any editor!
HG debugconfig output:
c:wampwwwSiteAB.comweb>hg debugconfig
bundle.mainreporoot=c:wampwwwSiteAB.comweb
ui.username=killroy
ui.shell=true
ui.verbose=true
ui.visual="C:PortableAppsNotepad++PortableNotepad++Portable.exe"
ui.editor="C:PortableAppsNotepad++PortableNotepad++Portable.exe"
See Question&Answers more detail:
os