convcmd: use our shlex wrapper to avoid Python 3 tracebacks
authorAugie Fackler <augie@google.com>
Thu, 01 Mar 2018 17:47:49 -0500
changeset 36558 d4c98b6724e1
parent 36557 d60430dc7853
child 36559 5374a22d014a
convcmd: use our shlex wrapper to avoid Python 3 tracebacks Differential Revision: https://phab.mercurial-scm.org/D2526
hgext/convert/convcmd.py
--- 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):