diff -r c80c16a8a0b0 -r caf7e1c5efe4 mercurial/commands.py --- a/mercurial/commands.py Fri Dec 23 16:26:40 2016 +0000 +++ b/mercurial/commands.py Sun Dec 25 03:06:55 2016 +0530 @@ -11,7 +11,6 @@ import errno import os import re -import shlex import socket import string import sys @@ -1981,7 +1980,7 @@ editor = ui.geteditor() editor = util.expandpath(editor) fm.write('editor', _("checking commit editor... (%s)\n"), editor) - cmdpath = util.findexe(shlex.split(editor)[0]) + cmdpath = util.findexe(pycompat.shlexsplit(editor)[0]) fm.condwrite(not cmdpath and editor == 'vi', 'vinotfound', _(" No commit editor set and can't find %s in PATH\n" " (specify a commit editor in your configuration"