demandimport: support keyword arguments on _hgextimport
__import__ supports keyword arguments since Python 2.5. This
proxy should too.
An upcoming patch will use this feature.
--- a/mercurial/demandimport.py Sat Aug 08 16:24:57 2015 -0700
+++ b/mercurial/demandimport.py Sat Aug 08 17:07:34 2015 -0700
@@ -43,9 +43,9 @@
level = 0
_import = _origimport
-def _hgextimport(importfunc, name, globals, *args):
+def _hgextimport(importfunc, name, globals, *args, **kwargs):
try:
- return importfunc(name, globals, *args)
+ return importfunc(name, globals, *args, **kwargs)
except ImportError:
if not globals:
raise
@@ -56,7 +56,7 @@
if nameroot != contextroot:
raise
# retry to import with "hgext_" prefix
- return importfunc(hgextname, globals, *args)
+ return importfunc(hgextname, globals, *args, **kwargs)
class _demandmod(object):
"""module demand-loader and proxy"""