From patchwork Thu Mar 1 23:22:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D2526: convcmd: use our shlex wrapper to avoid Python 3 tracebacks From: phabricator X-Patchwork-Id: 28618 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Thu, 1 Mar 2018 23:22:44 +0000 durin42 created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D2526 AFFECTED FILES hgext/convert/convcmd.py CHANGE DETAILS To: durin42, #hg-reviewers Cc: mercurial-devel diff --git a/hgext/convert/convcmd.py b/hgext/convert/convcmd.py --- a/hgext/convert/convcmd.py +++ b/hgext/convert/convcmd.py @@ -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):