Submitter | Yuya Nishihara |
---|---|
Date | Feb. 21, 2016, 5:37 a.m. |
Message ID | <b7583bf4ed46e7c02246.1456033071@mimosa> |
Download | mbox | patch |
Permalink | /patch/13284/ |
State | Accepted |
Headers | show |
Comments
Patch
diff --git a/mercurial/demandimport.py b/mercurial/demandimport.py --- a/mercurial/demandimport.py +++ b/mercurial/demandimport.py @@ -174,7 +174,12 @@ def _demandimport(name, globals=None, lo """ symbol = getattr(mod, attr, nothing) if symbol is nothing: - symbol = _demandmod(attr, mod.__dict__, locals, level=1) + mn = '%s.%s' % (mod.__name__, attr) + if mn in ignore: + importfunc = _origimport + else: + importfunc = _demandmod + symbol = importfunc(attr, mod.__dict__, locals, level=1) setattr(mod, attr, symbol) # Record the importing module references this symbol so we can