From patchwork Sat Mar 3 13:27:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [01, of, 11] py3: don't try to mangle C extension blob by code transformer From: Yuya Nishihara X-Patchwork-Id: 28766 Message-Id: <39f26de931737db2ee20.1520083654@mimosa> To: mercurial-devel@mercurial-scm.org Date: Sat, 03 Mar 2018 08:27:34 -0500 # HG changeset patch # User Yuya Nishihara # Date 1520074245 18000 # Sat Mar 03 05:50:45 2018 -0500 # Node ID 39f26de931737db2ee20b90925f7b3eb56423a89 # Parent cdf5ea49828ae71c8340b2806733ce49b4a549da py3: don't try to mangle C extension blob by code transformer diff --git a/mercurial/__init__.py b/mercurial/__init__.py --- a/mercurial/__init__.py +++ b/mercurial/__init__.py @@ -31,6 +31,9 @@ if sys.version_info[0] >= 3: # Only handle Mercurial-related modules. if not fullname.startswith(('mercurial.', 'hgext.', 'hgext3rd.')): return None + # don't try to parse binary + if fullname.startswith('mercurial.cext.'): + return None # third-party packages are expected to be dual-version clean if fullname.startswith('mercurial.thirdparty'): return None