diff mercurial/commands.py @ 30678:caf7e1c5efe4

py3: have a bytes version of shlex.split() shlex.split() only accepts unicodes on Python 3. After this patch we will be using pycompat.shlexsplit(). This patch also replaces existing occurences of shlex.split with pycompat.shlexsplit.
author Pulkit Goyal <7895pulkit@gmail.com>
date Sun, 25 Dec 2016 03:06:55 +0530
parents 10b17ed9b591
children 8d46eaaa589c
line wrap: on
line diff
--- 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"