demandimport: fix an obscure corner-case.
Python's __import__() function has 'level' as the fourth argument, not the
third. The code path in question probably never worked.
(This was seen trying to run Mercurial in PyPy. Fixing this made it
die somewhere else...)
--- a/mercurial/demandimport.py Sun Oct 10 00:38:57 2010 +0100
+++ b/mercurial/demandimport.py Tue Sep 14 23:00:39 2010 +0200
@@ -45,7 +45,7 @@
if not self._module:
head, globals, locals, after, level = self._data
if level is not None:
- mod = _origimport(head, globals, locals, level)
+ mod = _origimport(head, globals, locals, level=level)
else:
mod = _origimport(head, globals, locals)
# load submodules