I have TortoiseHg installed on Windows XP. Although I can use most hg
commands normally from the command line, I cannot use hg commit
(without the -m
option) because it fails to launch my editor. This is what happens:
> hg commit
/c: /c: is a directory
abort: edit failed: notepad.exe exited with status 126
in mercurial.ini I have the editor set as: [ui] editor = notepad.exe
If I myself type notepad.exe
or even just notepad
from the command line then notepad works fine. Changing the editor variable to something else (like to foobar
) confirms that Mercurial is reading the variable and trying to run foobar
with the same result (foobar exited with status 126
).
I also have a problem using parts of the TortoiseHg GUI. Context menu options like "View at revision" don't work when clicked. Presumably they are trying to launch the editor but are failing.
This problem has persisted for about 2 1/2 years of using Mercurial, and I've tried everything I can think of to set the editor variable in another way or set it to another program. Currently using TortoiseHg version 2.8 ("with Mercurial-2.6, Python-2.7.3, PyQt-4.9.6, Qt-4.8.4").
related questions:
Using other editor with TortoiseHg
How do I specify a different editor for Mercurial on Windows?
Mercurial Editor: "abort: The system cannot find the file specified"