comparison mercurial/debugcommands.py @ 36342:94a1ff16f362

debuginstall: do not parse editor command in posix way on Windows An editor command is executed by a system shell, which is cmd.exe on Windows.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 17 Feb 2018 13:13:04 +0900
parents 564dec70b50c
children 3f67c56a5fd7
comparison
equal deleted inserted replaced
36341:548316560a05 36342:94a1ff16f362
1238 _(" (templates seem to have been installed incorrectly)\n")) 1238 _(" (templates seem to have been installed incorrectly)\n"))
1239 1239
1240 # editor 1240 # editor
1241 editor = ui.geteditor() 1241 editor = ui.geteditor()
1242 editor = util.expandpath(editor) 1242 editor = util.expandpath(editor)
1243 editorbin = pycompat.shlexsplit(editor)[0] 1243 editorbin = pycompat.shlexsplit(editor, posix=not pycompat.iswindows)[0]
1244 fm.write('editor', _("checking commit editor... (%s)\n"), editorbin) 1244 fm.write('editor', _("checking commit editor... (%s)\n"), editorbin)
1245 cmdpath = util.findexe(editorbin) 1245 cmdpath = util.findexe(editorbin)
1246 fm.condwrite(not cmdpath and editor == 'vi', 'vinotfound', 1246 fm.condwrite(not cmdpath and editor == 'vi', 'vinotfound',
1247 _(" No commit editor set and can't find %s in PATH\n" 1247 _(" No commit editor set and can't find %s in PATH\n"
1248 " (specify a commit editor in your configuration" 1248 " (specify a commit editor in your configuration"