mercurial/debugcommands.py
changeset 36335 d639f60c8eb3
parent 36318 3f67c56a5fd7
child 36399 a24c57f1f5c3
--- a/mercurial/debugcommands.py	Tue Feb 20 21:37:30 2018 -0500
+++ b/mercurial/debugcommands.py	Tue Feb 20 22:03:13 2018 -0500
@@ -1241,6 +1241,8 @@
     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]
     fm.write('editor', _("checking commit editor... (%s)\n"), editorbin)
     cmdpath = util.findexe(editorbin)
     fm.condwrite(not cmdpath and editor == 'vi', 'vinotfound',