Why does histedit not respect EDITOR variable?

Adrian Klaver adrian.klaver at aklaver.com
Fri Jan 8 16:23:04 CST 2016


On 01/08/2016 02:19 PM, Benjamin Fritz wrote:
> I am using TortoiseHg, so maybe that contributes to my issue, but the
> same behavior happens running directly on the command line.
>
> I have my EDITOR environment variable set to "gvim -f" (without the quotes).
>
> When I run "hg histedit 1234" I get notepad.exe instead of gvim.
>
> If I set HGEDITOR to "gvim -f" then I get gvim as desired.
>
> https://www.mercurial-scm.org/wiki/editor indicates that EDITOR should
> be used if HGEDITOR and a couple other variables are not set. On my
> system, only the EDITOR variable is currently set. What's going on? Is
> this intentional behavior on Windows for some reason?

Well, from the above link:

"On Windows, the installer places a configuration file inside 
%programfiles%\Mercurial\hgrc.d\ that contains the editor settings 
(notepad by default). Thus, if you want to override it, you either have 
to redefine the configuration option or use an HGEDITOR environment 
variable (VISUAL and EDITOR will be ignored). "

>
> I'm running Mercurial 3.5.2 on Windows 7 64-bit.
>
> --
> Ben
>
>
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> https://selenic.com/mailman/listinfo/mercurial
>


-- 
Adrian Klaver
adrian.klaver at aklaver.com


More information about the Mercurial mailing list