# HG changeset patch # User timeless <timel...@mozdev.org> # Date 1474429251 0 # Wed Sep 21 03:40:51 2016 +0000 # Node ID d750b7a37b860dedeea32f803c03f81ff005fed4 # Parent 982fe7cdb28bb263a96b1bc2c9c3b8aedb025ab6 # Available At https://bitbucket.org/timeless/mercurial-crew # hg pull https://bitbucket.org/timeless/mercurial-crew -r d750b7a37b86 demandimport: refactor processfromlist
diff -r 982fe7cdb28b -r d750b7a37b86 mercurial/demandimport.py --- a/mercurial/demandimport.py Wed Sep 21 03:39:37 2016 +0000 +++ b/mercurial/demandimport.py Wed Sep 21 03:40:51 2016 +0000 @@ -220,6 +220,10 @@ mod = getattr(mod, comp) return mod + def processfromlist(mod, name, fromlist): + if True: + for x in fromlist: + processfromitem(mod, x) if level >= 0: if name: # "from a import b" or "from .a import b" style @@ -242,8 +246,7 @@ mod = _hgextimport(_origimport, name, globals, locals, level=level) - for x in fromlist: - processfromitem(mod, x) + processfromlist(mod, name, fromlist) return mod @@ -251,9 +254,7 @@ # party modules. So handle level == -1. mod = _hgextimport(_origimport, name, globals, locals) mod = chainmodules(mod, name) - - for x in fromlist: - processfromitem(mod, x) + processfromlist(mod, name, fromlist) return mod _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel