changeset 36587:d4c98b6724e1

convcmd: use our shlex wrapper to avoid Python 3 tracebacks Differential Revision: https://phab.mercurial-scm.org/D2526
author Augie Fackler <augie@google.com>
date Thu, 01 Mar 2018 17:47:49 -0500
parents d60430dc7853
children 5374a22d014a
files hgext/convert/convcmd.py
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/convcmd.py	Thu Mar 01 17:47:35 2018 -0500
+++ b/hgext/convert/convcmd.py	Thu Mar 01 17:47:49 2018 -0500
@@ -8,7 +8,6 @@
 
 import collections
 import os
-import shlex
 import shutil
 
 from mercurial.i18n import _
@@ -211,9 +210,7 @@
                     # Ignore blank lines
                     continue
                 # split line
-                lex = shlex.shlex(line, posix=True)
-                lex.whitespace_split = True
-                lex.whitespace += ','
+                lex = common.shlexer(data=line, whitespace=',')
                 line = list(lex)
                 # check number of parents
                 if not (2 <= len(line) <= 3):