From patchwork Fri Nov 1 16:39:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D7188: git: force using bytes in command name From: phabricator X-Patchwork-Id: 42653 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Fri, 1 Nov 2019 16:39:21 +0000 maho 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/D7188 AFFECTED FILES mercurial/extensions.py CHANGE DETAILS To: maho, #hg-reviewers Cc: mercurial-devel diff --git a/mercurial/extensions.py b/mercurial/extensions.py --- a/mercurial/extensions.py +++ b/mercurial/extensions.py @@ -549,6 +549,8 @@ extensions.wrapcommand(commands.table, 'bookmarks', exbookmarks, synopsis, docstring) ''' + assert command == stringutil.forcebytestr(command), \ + "`command` should be bytes(python3)/str(python2)" assert callable(wrapper) aliases, entry = cmdutil.findcmd(command, table) for alias, e in pycompat.iteritems(table):