Mercurial > hg
diff mercurial/demandload.py @ 2956:6dddcba7596a
merge.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Fri, 18 Aug 2006 21:17:28 -0700 |
parents | a8a7ce1a01a5 |
children | 61afc32c1a49 |
line wrap: on
line diff
--- a/mercurial/demandload.py Sun Jul 23 09:04:14 2006 -0700 +++ b/mercurial/demandload.py Fri Aug 18 21:17:28 2006 -0700 @@ -96,6 +96,7 @@ foo import foo foo bar import foo, bar + foo@bar import foo as bar foo.bar import foo.bar foo:bar from foo import bar foo:bar,quux from foo import bar, quux @@ -108,6 +109,9 @@ mod = mod[:col] else: fromlist = [] + as = None + if '@' in mod: + mod, as = mod.split("@") importer = _importer(scope, mod, fromlist) if fromlist: for name in fromlist: @@ -126,4 +130,6 @@ continue else: basemod = mod - scope[basemod] = _replacer(importer, basemod) + if not as: + as = basemod + scope[as] = _replacer(importer, as)