Submitter | mercurial-bugs@selenic.com |
---|---|
Date | Sept. 6, 2013, 2:22 a.m. |
Message ID | <bug-4029-285@http.bz.selenic.com/> |
Download | mbox | patch |
Permalink | /patch/2387/ |
State | Not Applicable |
Headers | show |
Comments
Patch
diff -r 1d07bf106c2a mercurial/demandimport.py --- a/mercurial/demandimport.py Wed Sep 04 18:42:55 2013 -0700 +++ b/mercurial/demandimport.py Thu Sep 05 22:11:20 2013 -0400 @@ -55,7 +55,9 @@ def _load(self): if not self._module: head, globals, locals, after = self._data - mod = _origimport(head, globals, locals) + if 'absolute_import' in locals: + level = 0 + mod = _origimport(head, globals, locals, [], level) # load submodules def subload(mod, p): h, t = p, None