Mercurial > public > mercurial-scm > hg-stable
diff hgext/extdiff.py @ 30681: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 | d5883fd055c6 |
children | 08e6f4dac2ca |
line wrap: on
line diff
--- a/hgext/extdiff.py Fri Dec 23 16:26:40 2016 +0000 +++ b/hgext/extdiff.py Sun Dec 25 03:06:55 2016 +0530 @@ -64,7 +64,6 @@ import os import re -import shlex import shutil import tempfile from mercurial.i18n import _ @@ -78,6 +77,7 @@ commands, error, filemerge, + pycompat, scmutil, util, ) @@ -371,7 +371,7 @@ if path: # case "cmd = path opts" cmdline = path - diffopts = len(shlex.split(cmdline)) > 1 + diffopts = len(pycompat.shlexsplit(cmdline)) > 1 else: # case "cmd =" path = util.findexe(cmd)