mercurial/debugcommands.py
changeset 36415 0cb09c322647
parent 36399 a24c57f1f5c3
child 36459 580f75f70f39
--- a/mercurial/debugcommands.py	Fri Feb 23 23:09:58 2018 +0900
+++ b/mercurial/debugcommands.py	Wed Feb 21 22:20:27 2018 +0900
@@ -1240,9 +1240,7 @@
     # editor
     editor = ui.geteditor()
     editor = util.expandpath(editor)
-    editorbin = pycompat.shlexsplit(editor, posix=not pycompat.iswindows)[0]
-    if pycompat.iswindows and editorbin[0] == '"' and editorbin[-1] == '"':
-        editorbin = editorbin[1:-1]
+    editorbin = util.shellsplit(editor)[0]
     fm.write('editor', _("checking commit editor... (%s)\n"), editorbin)
     cmdpath = util.findexe(editorbin)
     fm.condwrite(not cmdpath and editor == 'vi', 'vinotfound',