diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py --- a/mercurial/debugcommands.py +++ b/mercurial/debugcommands.py @@ -1240,7 +1240,7 @@ def debuginstall(ui, **opts): # editor editor = ui.geteditor() editor = util.expandpath(editor) - editorbin = pycompat.shlexsplit(editor)[0] + editorbin = pycompat.shlexsplit(editor, posix=not pycompat.iswindows)[0] fm.write('editor', _("checking commit editor... (%s)\n"), editorbin) cmdpath = util.findexe(editorbin) fm.condwrite(not cmdpath and editor == 'vi', 'vinotfound', diff --git a/tests/test-install.t b/tests/test-install.t --- a/tests/test-install.t +++ b/tests/test-install.t @@ -140,8 +140,10 @@ not found (this is intentionally using b checking "re2" regexp engine \((available|missing)\) (re) checking templates (*mercurial?templates)... (glob) checking default template (*mercurial?templates?map-cmdline.default) (glob) - checking commit editor... (c:foobarbaz.exe) - Can't find editor 'c:foobarbaz.exe' in PATH + checking commit editor... (c:\foo\bar\baz.exe) (windows !) + Can't find editor 'c:\foo\bar\baz.exe' in PATH (windows !) + checking commit editor... (c:foobarbaz.exe) (no-windows !) + Can't find editor 'c:foobarbaz.exe' in PATH (no-windows !) (specify a commit editor in your configuration file) checking username (test) 1 problems detected, please check your install!