Mercurial > hg > mercurial-source
changeset 33153:017ad85e5ac8
diffhelpers: switch to policy importer
# no-check-commit
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 13 Aug 2016 12:15:49 +0900 |
parents | 3b88a7fa97d8 |
children | 151cc3b3d799 |
files | contrib/check-py3-compat.py contrib/import-checker.py contrib/wix/dist.wxs mercurial/__init__.py mercurial/cext/diffhelpers.c mercurial/diffhelpers.c mercurial/patch.py setup.py |
diffstat | 7 files changed, 5 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/check-py3-compat.py +++ b/contrib/check-py3-compat.py @@ -17,7 +17,6 @@ # Modules that have both Python and C implementations. _dualmodules = ( - 'diffhelpers.py', 'mpatch.py', 'parsers.py', )
--- a/contrib/import-checker.py +++ b/contrib/import-checker.py @@ -26,7 +26,6 @@ # Modules that have both Python and C implementations. _dualmodules = ( - 'diffhelpers.py', 'mpatch.py', 'parsers.py', )
--- a/contrib/wix/dist.wxs +++ b/contrib/wix/dist.wxs @@ -14,7 +14,7 @@ <File Name="library.zip" KeyPath="yes" /> <File Name="mercurial.cext.base85.pyd" /> <File Name="mercurial.cext.bdiff.pyd" /> - <File Name="mercurial.diffhelpers.pyd" /> + <File Name="mercurial.cext.diffhelpers.pyd" /> <File Name="mercurial.mpatch.pyd" /> <File Name="mercurial.cext.osutil.pyd" /> <File Name="mercurial.parsers.pyd" />
--- a/mercurial/__init__.py +++ b/mercurial/__init__.py @@ -23,7 +23,6 @@ # Modules that have both Python and C implementations. See also the # set of .py files under mercurial/pure/. _dualmodules = { - 'mercurial.diffhelpers', 'mercurial.mpatch', 'mercurial.parsers', }
--- a/mercurial/patch.py +++ b/mercurial/patch.py @@ -27,18 +27,20 @@ ) from . import ( copies, - diffhelpers, encoding, error, mail, mdiff, pathutil, + policy, pycompat, scmutil, similar, util, vfs as vfsmod, ) + +diffhelpers = policy.importmod(r'diffhelpers') stringio = util.stringio gitre = re.compile(br'diff --git a/(.*) b/(.*)')
--- a/setup.py +++ b/setup.py @@ -628,7 +628,7 @@ 'mercurial/cext/bdiff.c'], include_dirs=common_include_dirs, depends=common_depends + ['mercurial/bdiff.h']), - Extension('mercurial.diffhelpers', ['mercurial/diffhelpers.c'], + Extension('mercurial.cext.diffhelpers', ['mercurial/cext/diffhelpers.c'], include_dirs=common_include_dirs, depends=common_depends), Extension('mercurial.mpatch', ['mercurial/mpatch.c',